fix: Fixed some parameter errors.
This commit is contained in:
parent
bf9cd3ca21
commit
a4b52f5895
@ -63,13 +63,13 @@ class FriendshipManager {
|
|||||||
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get Friend List, including friends who have been put into the blacklist
|
/// Get Friend List, including friends who have been put into the blacklist
|
||||||
Future<List<FriendInfo>> getFriendList({String? operationID}) => _channel
|
Future<List<FullUserInfo>> getFriendList({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
'getFriendList',
|
'getFriendList',
|
||||||
_buildParam({
|
_buildParam({
|
||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => FullUserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get Friend List, including friends who have been put into the blacklist (returns a map)
|
/// Get Friend List, including friends who have been put into the blacklist (returns a map)
|
||||||
Future<List<dynamic>> getFriendListMap({String? operationID}) => _channel
|
Future<List<dynamic>> getFriendListMap({String? operationID}) => _channel
|
||||||
|
@ -566,8 +566,6 @@ class GroupManager {
|
|||||||
|
|
||||||
/// Modify the GroupMemberInfo ex field
|
/// Modify the GroupMemberInfo ex field
|
||||||
Future<dynamic> setGroupMemberInfo({
|
Future<dynamic> setGroupMemberInfo({
|
||||||
required String groupID,
|
|
||||||
required String userID,
|
|
||||||
required GroupMembersInfo groupMembersInfo,
|
required GroupMembersInfo groupMembersInfo,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
|
@ -15,7 +15,7 @@ class UserManager {
|
|||||||
|
|
||||||
/// Get user information
|
/// Get user information
|
||||||
/// [userIDList] List of user IDs
|
/// [userIDList] List of user IDs
|
||||||
Future<List<UserInfo>> getUsersInfo({
|
Future<List<FullUserInfo>> getUsersInfo({
|
||||||
required List<String> userIDList,
|
required List<String> userIDList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
@ -26,7 +26,7 @@ class UserManager {
|
|||||||
'userIDList': userIDList,
|
'userIDList': userIDList,
|
||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => FullUserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get information of the currently logged-in user
|
/// Get information of the currently logged-in user
|
||||||
Future<UserInfo> getSelfUserInfo({
|
Future<UserInfo> getSelfUserInfo({
|
||||||
@ -115,7 +115,7 @@ class UserManager {
|
|||||||
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
.then((value) => Utils.toList(value, (map) => UserStatusInfo.fromJson(map)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<UserInfo>> getUsersInfoWithCache(
|
Future<List<FullUserInfo>> getUsersInfoWithCache(
|
||||||
List<String> userIDs, {
|
List<String> userIDs, {
|
||||||
String? groupID,
|
String? groupID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@ -128,7 +128,7 @@ class UserManager {
|
|||||||
'groupID': groupID,
|
'groupID': groupID,
|
||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (map) => UserInfo.fromJson(map)));
|
.then((value) => Utils.toList(value, (map) => FullUserInfo.fromJson(map)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map _buildParam(Map param) {
|
static Map _buildParam(Map param) {
|
||||||
|
@ -98,6 +98,22 @@ class FullUserInfo {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get userID {
|
||||||
|
return publicInfo?.userID ?? friendInfo?.userID ?? blackInfo?.userID ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
String get nickname {
|
||||||
|
return publicInfo?.nickname ?? friendInfo?.nickname ?? blackInfo?.nickname ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
String get faceURL {
|
||||||
|
return publicInfo?.faceURL ?? friendInfo?.faceURL ?? blackInfo?.faceURL ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
String get showName {
|
||||||
|
return friendInfo?.nickname ?? nickname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PublicUserInfo {
|
class PublicUserInfo {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user