ДАНОН ПРАБИФ ДОКС СВЯТ ПРОФИЛЕЙ

This commit is contained in:
Jganenok
2026-05-17 21:24:59 +07:00
parent 4987ae30ab
commit 78fa0251c5
6 changed files with 1198 additions and 60 deletions
+13
View File
@@ -471,6 +471,19 @@ class AppDatabase {
);
}
static Future<int?> findDialogChatByParticipant(int accountId, int contactId) async {
final db = await _instance;
final rows = await db.query(
'chats_cache',
columns: ['id'],
where: "account_id = ? AND type = 'DIALOG' AND participants LIKE ?",
whereArgs: [accountId, '%"$contactId":%'],
limit: 1,
);
if (rows.isEmpty) return null;
return rows.first['id'] as int?;
}
static Future<List<Map<String, dynamic>>> loadDialogChats(int accountId) async {
final db = await _instance;
return db.query(