Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -108,7 +108,7 @@ class MainController extends GetxController
Future<int> _msgUnread() async {
if (msgUnReadTypes.contains(MsgUnReadType.pm)) {
var res = await MsgHttp.msgUnread();
final res = await MsgHttp.msgUnread();
if (res case Success(:final response)) {
return response.followUnread +
response.unfollowUnread +
@@ -123,12 +123,12 @@ class MainController extends GetxController
Future<int> _msgFeedUnread() async {
int count = 0;
var remainTypes = Set<MsgUnReadType>.from(msgUnReadTypes)
final remainTypes = Set<MsgUnReadType>.from(msgUnReadTypes)
..remove(MsgUnReadType.pm);
if (remainTypes.isNotEmpty) {
var res = await MsgHttp.msgFeedUnread();
final res = await MsgHttp.msgFeedUnread();
if (res case Success(:final response)) {
for (var item in remainTypes) {
for (final item in remainTypes) {
switch (item) {
case MsgUnReadType.pm:
break;
@@ -160,7 +160,7 @@ class MainController extends GetxController
return;
}
var res = await Future.wait([_msgUnread(), _msgFeedUnread()]);
final res = await Future.wait([_msgUnread(), _msgFeedUnread()]);
final count = res.sum;