chat: UI настройки звука канала (Android toggle + JNI, desktop через C API) + trampoline
This commit is contained in:
1 parent
3d9c79e752
commit
cc0dcb071e
8 files changed
+116
-10
No files matched your search
@@ -288,6 +288,13 @@ void chat_core_set_sound_on_message(struct UTUN_INSTANCE* inst, const char* ch_i
|
||||
chat_sync_broadcast_sound_setting(inst, ch_id, on ? 1 : 0);
|
||||
}
|
||||
|
||||
void chat_core_set_sound_on_message_trampoline(void* arg) {
|
||||
struct chat_sound_arg* a = (struct chat_sound_arg*)arg;
|
||||
if (!a) return;
|
||||
chat_core_set_sound_on_message(a->inst, a->ch_id, a->on);
|
||||
u_free(arg);
|
||||
}
|
||||
|
||||
/* ─── headless API ─── */
|
||||
|
||||
static void json_escape(const char* src, char* dst, size_t dst_sz) {
|
||||
|
||||
@@ -125,6 +125,9 @@ void chat_core_save_ui_state(struct UTUN_INSTANCE* inst, const char* key, const
|
||||
int chat_core_get_sound_on_message(struct UTUN_INSTANCE* inst, const char* ch_id);
|
||||
void chat_core_set_sound_on_message(struct UTUN_INSTANCE* inst, const char* ch_id, int on);
|
||||
|
||||
struct chat_sound_arg { struct UTUN_INSTANCE* inst; char ch_id[64]; int on; };
|
||||
void chat_core_set_sound_on_message_trampoline(void* arg);
|
||||
|
||||
struct save_ui_state_arg { struct UTUN_INSTANCE* inst; char data[256]; };
|
||||
void chat_core_save_ui_state_trampoline(void* arg);
|
||||
|
||||
|
||||
Reference in new issue
Block a user