feat(mobile-next): 工号登录与目录薄适配,并完成登录/会话/聊天/通讯录第一批界面

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
编码工程师
2026-08-20 02:30:10 +08:00
co-authored by Cursor multica-agent
parent d787c0a477
commit 60b6590409
17 changed files with 842 additions and 166 deletions
@@ -2,7 +2,6 @@ import 'dart:async';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
import 'package:get/get.dart';
import 'package:openim/routes/app_navigator.dart';
import 'package:openim_common/openim_common.dart';
import '../../../core/controller/im_controller.dart';
@@ -69,9 +68,27 @@ class FriendRequestsLogic extends GetxController {
bool isISendRequest(FriendApplicationInfo info) => info.fromUserID == OpenIM.iMManager.userID;
void acceptFriendApplication(FriendApplicationInfo info) => AppNavigator.startProcessFriendRequests(
applicationInfo: info,
void acceptFriendApplication(FriendApplicationInfo info) async {
try {
await LoadingView.singleton.wrap(
asyncFunction: () => OpenIM.iMManager.friendshipManager.acceptFriendApplication(userID: info.fromUserID!),
);
IMViews.showToast(StrRes.addSuccessfully);
_getFriendRequestsList();
} catch (_) {
IMViews.showToast(StrRes.addFailed);
}
}
void refuseFriendApplication(FriendApplicationInfo info) async {}
void refuseFriendApplication(FriendApplicationInfo info) async {
try {
await LoadingView.singleton.wrap(
asyncFunction: () => OpenIM.iMManager.friendshipManager.refuseFriendApplication(userID: info.fromUserID!),
);
IMViews.showToast(StrRes.rejectSuccessfully);
_getFriendRequestsList();
} catch (_) {
IMViews.showToast(StrRes.rejectFailed);
}
}
}