feat: logout (#497)

* feat: logout

* update api type
This commit is contained in:
My-Responsitories
2025-03-23 13:46:26 +08:00
committed by GitHub
parent 7c3e3cb1f8
commit d6587cf3b6
11 changed files with 139 additions and 129 deletions

View File

@@ -35,7 +35,7 @@ class MainController extends GetxController {
late int homeIndex = -1;
late DynamicBadgeMode msgBadgeMode = GStorage.msgBadgeMode;
late List<MsgUnReadType> msgUnReadTypes = GStorage.msgUnReadTypeV2;
late Set<MsgUnReadType> msgUnReadTypes = GStorage.msgUnReadTypeV2.toSet();
late final RxString msgUnReadCount = ''.obs;
late int lastCheckUnreadAt = 0;
@@ -83,7 +83,7 @@ class MainController extends GetxController {
try {
bool shouldCheckPM = msgUnReadTypes.contains(MsgUnReadType.pm);
bool shouldCheckFeed =
([...msgUnReadTypes]..remove(MsgUnReadType.pm)).isNotEmpty;
shouldCheckPM ? msgUnReadTypes.length > 1 : msgUnReadTypes.isNotEmpty;
List res = await Future.wait([
if (shouldCheckPM) _queryPMUnread(),
if (shouldCheckFeed) _queryMsgFeedUnread(),