feat(folders): исправление автосортировки папок

This commit is contained in:
klockky
2026-07-09 19:13:06 +03:00
parent 53bf892f04
commit 7dab8f09f7
7 changed files with 136 additions and 24 deletions
+9
View File
@@ -8,6 +8,7 @@ class KometSettings {
static const _kGhostMode = 'komet_ghost_mode';
static const _kAntiRead = 'komet_anti_read';
static const _kSelfOnlineCheck = 'komet_self_online_check';
static const _kHideAllChatsFolder = 'komet_hide_all_chats_folder';
static final ValueNotifier<bool> viewDeleted = ValueNotifier(false);
static final ValueNotifier<bool> viewRedacted = ValueNotifier(false);
@@ -15,6 +16,7 @@ class KometSettings {
static final ValueNotifier<bool> ghostMode = ValueNotifier(false);
static final ValueNotifier<bool> antiRead = ValueNotifier(false);
static final ValueNotifier<bool> selfOnlineCheck = ValueNotifier(true);
static final ValueNotifier<bool> hideAllChatsFolder = ValueNotifier(false);
static Future<void> load() async {
final prefs = await SharedPreferences.getInstance();
@@ -24,6 +26,7 @@ class KometSettings {
ghostMode.value = prefs.getBool(_kGhostMode) ?? false;
antiRead.value = prefs.getBool(_kAntiRead) ?? false;
selfOnlineCheck.value = prefs.getBool(_kSelfOnlineCheck) ?? true;
hideAllChatsFolder.value = prefs.getBool(_kHideAllChatsFolder) ?? false;
}
static Future<void> setViewDeleted(bool value) async {
@@ -61,4 +64,10 @@ class KometSettings {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool(_kSelfOnlineCheck, value);
}
static Future<void> setHideAllChatsFolder(bool value) async {
hideAllChatsFolder.value = value;
final prefs = await SharedPreferences.getInstance();
await prefs.setBool(_kHideAllChatsFolder, value);
}
}
+2
View File
@@ -11,6 +11,7 @@ abstract class Opcode {
static const int reconnect = 3; // Реконнект
static const int log = 5; // Аналитика / события
static const int sessionInit = 6; // Инициализация сессии (хэндшейк)
static const int contactsGet = 8; // Синхронизация списка контактов
// ── Profile ────────────────────────────────────────────────────────
static const int profile = 16; // Обновление профиля
@@ -226,6 +227,7 @@ abstract class Opcode {
reconnect: 'RECONNECT',
log: 'LOG',
sessionInit: 'SESSION_INIT',
contactsGet: 'CONTACTS_GET',
profile: 'PROFILE',
authRequest: 'AUTH_REQUEST',
auth: 'AUTH',