больше информации в подробнее

This commit is contained in:
Jganenok
2026-05-13 21:26:46 +07:00
parent c6ea5d6dcf
commit 07d39ffa24
14 changed files with 1724 additions and 39 deletions
+14
View File
@@ -124,6 +124,7 @@ abstract class SyncKey {
static const configHash = 'config_hash';
static const chatCacheFingerprint = 'chat_cache_fingerprint';
static const serverTime = 'server_time';
static const loginInfo = 'login_info';
}
class AppDatabase {
@@ -392,6 +393,19 @@ class AppDatabase {
return rows.first['value'] as String;
}
static Future<void> saveLoginInfo(int accountId, String jsonInfo) async {
final db = await _instance;
await db.insert('sync_state', {
'account_id': accountId,
'key': SyncKey.loginInfo,
'value': jsonInfo,
}, conflictAlgorithm: ConflictAlgorithm.replace);
}
static Future<String?> getLoginInfo(int accountId) async {
return getSyncValue(accountId, SyncKey.loginInfo);
}
static Future<void> close() async {
await _db?.close();
_db = null;