chat: локальное удаление канала (Android) + db_sync инстансы в куче

This commit is contained in:
evgeny committed 2026-09-13 22:08:33 +03:00
1 parent ddfffad1ed
commit 7c8d65db78
30 files changed
+466 -42

No files matched your search

+14
View File
@@ -679,6 +679,20 @@ void chat_sync_connect_node(struct UTUN_INSTANCE* inst, uint64_t node_id) {
(void)inst; (void)node_id;
}
void chat_sync_on_channel_deleted(struct UTUN_INSTANCE* inst, const char* ch_id) {
(void)inst;
if (!g_cs || !ch_id || !ch_id[0]) return;
for (int i = 0; i < g_cs->channel_count; i++) {
if (strcmp(g_cs->channels[i].channel_id, ch_id) != 0) continue;
if (g_cs->channels[i].peer_ids) u_free(g_cs->channels[i].peer_ids);
memmove(&g_cs->channels[i], &g_cs->channels[i + 1],
(size_t)(g_cs->channel_count - i - 1) * sizeof(struct channel_cache));
g_cs->channel_count--;
DEBUG_INFO(DEBUG_CATEGORY_MEMBER_SYNC, "%s: channel removed from cache ch=%s", CS_ID, ch_id);
return;
}
}
struct chat_invite {
uint64_t channel_id;
uint64_t node_id;