From bd210e74cb8b360ece2bcc562ee0307fae884955 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:05:50 +0800 Subject: [PATCH] fix: Why does 3.8.1 getFriendList return List instead of List? (#165) --- lib/src/manager/im_friendship_manager.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/manager/im_friendship_manager.dart b/lib/src/manager/im_friendship_manager.dart index 82f25ad..e132805 100644 --- a/lib/src/manager/im_friendship_manager.dart +++ b/lib/src/manager/im_friendship_manager.dart @@ -19,7 +19,7 @@ class FriendshipManager { /// Query Friend Information /// [userIDList] List of user IDs - Future> getFriendsInfo({ + Future> getFriendsInfo({ required List userIDList, bool filterBlack = false, String? operationID, @@ -32,7 +32,7 @@ class FriendshipManager { 'filterBlack': filterBlack, "operationID": Utils.checkOperationID(operationID), })) - .then((value) => Utils.toList(value, (v) => PublicUserInfo.fromJson(v))); + .then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v))); /// Send a Friend Request, the other party needs to accept the request to become friends. /// [userID] User ID to be invited @@ -69,7 +69,7 @@ class FriendshipManager { .then((value) => Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v))); /// Get Friend List, including friends who have been put into the blacklist - Future> getFriendList({ + Future> getFriendList({ String? operationID, bool filterBlack = false, }) => @@ -80,9 +80,9 @@ class FriendshipManager { 'filterBlack': filterBlack, "operationID": Utils.checkOperationID(operationID), })) - .then((value) => Utils.toList(value, (v) => PublicUserInfo.fromJson(v))); + .then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v))); - Future> getFriendListPage({ + Future> getFriendListPage({ bool filterBlack = false, int offset = 0, int count = 40, @@ -97,7 +97,7 @@ class FriendshipManager { 'filterBlack': filterBlack, "operationID": Utils.checkOperationID(operationID), })) - .then((value) => Utils.toList(value, (v) => PublicUserInfo.fromJson(v))); + .then((value) => Utils.toList(value, (v) => FriendInfo.fromJson(v))); /// Get Friend List, including friends who have been put into the blacklist (returns a map) Future> getFriendListMap({String? operationID}) => _channel