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
@@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
||||
import 'package:openim_common/openim_common.dart';
|
||||
|
||||
import '../../company/brand/app_tokens.dart';
|
||||
import '../../company/ui/state_views.dart';
|
||||
import 'contacts_logic.dart';
|
||||
|
||||
class ContactsPage extends StatelessWidget {
|
||||
@@ -19,12 +20,19 @@ class ContactsPage extends StatelessWidget {
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: logic.addContacts,
|
||||
icon: const Icon(Icons.person_add_alt, size: AppIconSize.md, color: AppColors.textPrimary),
|
||||
icon: const Icon(Icons.person_add_alt,
|
||||
size: AppIconSize.md, color: AppColors.textPrimary),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Obx(
|
||||
() => Column(
|
||||
body: Obx(() {
|
||||
if (logic.loading.value) {
|
||||
return const CompanyLoadingView();
|
||||
}
|
||||
if (logic.loadFailed.value) {
|
||||
return CompanyFailView(onRetry: logic.reload);
|
||||
}
|
||||
return Column(
|
||||
children: [
|
||||
_entry(
|
||||
icon: Icons.person_add_alt,
|
||||
@@ -44,8 +52,8 @@ class ContactsPage extends StatelessWidget {
|
||||
onTap: logic.myFriend,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,10 +79,13 @@ class ContactsPage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(AppRadius.control),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Icon(icon, size: AppIconSize.sm, color: AppColors.primary),
|
||||
child:
|
||||
Icon(icon, size: AppIconSize.sm, color: AppColors.primary),
|
||||
),
|
||||
const SizedBox(width: AppGap.x3),
|
||||
Text(label, style: const TextStyle(fontSize: AppFont.body, color: AppColors.textPrimary)),
|
||||
Text(label,
|
||||
style: const TextStyle(
|
||||
fontSize: AppFont.body, color: AppColors.textPrimary)),
|
||||
const Spacer(),
|
||||
if (count > 0) UnreadCountView(count: count),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user