fix(mobile-next): 把加载、失败、断网接到真实 SDK 与目录请求
会话列表、通讯录、好友申请、添加同事页覆盖 CompanyLoadingView/CompanyFailView; 主页断网横幅跟随 IMSdkStatus.connectionFailed。不伪造状态。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
092f513708
commit
2b2c2d28a4
@@ -24,6 +24,7 @@ class HomeLogic extends SuperController {
|
||||
final unhandledFriendApplicationCount = 0.obs;
|
||||
final unhandledGroupApplicationCount = 0.obs;
|
||||
final unhandledCount = 0.obs;
|
||||
final isOffline = false.obs;
|
||||
String? _lockScreenPwd;
|
||||
bool _isShowScreenLock = false;
|
||||
bool? _isAutoLogin;
|
||||
@@ -50,7 +51,8 @@ class HomeLogic extends SuperController {
|
||||
|
||||
void getUnhandledFriendApplicationCount() async {
|
||||
var i = 0;
|
||||
var list = await OpenIM.iMManager.friendshipManager.getFriendApplicationListAsRecipient();
|
||||
var list = await OpenIM.iMManager.friendshipManager
|
||||
.getFriendApplicationListAsRecipient();
|
||||
var haveReadList = DataSp.getHaveReadUnHandleFriendApplication();
|
||||
haveReadList ??= <String>[];
|
||||
for (var info in list) {
|
||||
@@ -65,7 +67,8 @@ class HomeLogic extends SuperController {
|
||||
|
||||
void getUnhandledGroupApplicationCount() async {
|
||||
var i = 0;
|
||||
var list = await OpenIM.iMManager.groupManager.getGroupApplicationListAsRecipient();
|
||||
var list = await OpenIM.iMManager.groupManager
|
||||
.getGroupApplicationListAsRecipient();
|
||||
var haveReadList = DataSp.getHaveReadUnHandleGroupApplication();
|
||||
haveReadList ??= <String>[];
|
||||
for (var info in list) {
|
||||
@@ -101,7 +104,12 @@ class HomeLogic extends SuperController {
|
||||
if (value.status == IMSdkStatus.syncStart) {
|
||||
_getRTCInvitationStart();
|
||||
}
|
||||
isOffline.value = value.status == IMSdkStatus.connectionFailed;
|
||||
});
|
||||
final lastStatus = imLogic.imSdkStatusSubject.values.lastOrNull;
|
||||
if (lastStatus != null) {
|
||||
isOffline.value = lastStatus.status == IMSdkStatus.connectionFailed;
|
||||
}
|
||||
|
||||
Apis.kickoffController.stream.listen((event) {
|
||||
DataSp.removeLoginCertificate();
|
||||
|
||||
Reference in New Issue
Block a user