修改入参

main
hrxiang 4 years ago
parent 7508f4aa96
commit 8466e9e262
  1. 14
      android/src/main/java/io/openim/flutter_openim_sdk/manager/FriendshipManager.java
  2. 2
      android/src/main/java/io/openim/flutter_openim_sdk/manager/IMManager.java
  3. 11
      android/src/main/java/io/openim/flutter_openim_sdk/util/CommonUtil.java

@ -20,7 +20,7 @@ public class FriendshipManager {
}
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getFriendsInfo(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.getFriendsInfo(new BaseImpl(result), CommonUtil.getUidList(methodCall));
}
public void addFriend(MethodCall methodCall, MethodChannel.Result result) {
@ -40,7 +40,7 @@ public class FriendshipManager {
}
public void addToBlackList(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.addToBlackList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.addToBlackList(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
}
public void getBlackList(MethodCall methodCall, MethodChannel.Result result) {
@ -48,23 +48,23 @@ public class FriendshipManager {
}
public void deleteFromBlackList(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.deleteFromBlackList(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.deleteFromBlackList(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
}
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.checkFriend(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.checkFriend(new BaseImpl(result), CommonUtil.getUidList(methodCall));
}
public void deleteFromFriendList(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.deleteFromFriendList(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result));
Open_im_sdk.deleteFromFriendList(CommonUtil.getJsonUid(methodCall), new BaseImpl(result));
}
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.acceptFriendApplication(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.acceptFriendApplication(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
}
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.refuseFriendApplication(new BaseImpl(result), CommonUtil.getSDKJsonParam(methodCall));
Open_im_sdk.refuseFriendApplication(new BaseImpl(result), CommonUtil.getJsonUid(methodCall));
}
public void forceSyncFriendApplication(MethodCall methodCall, MethodChannel.Result result) {

@ -37,7 +37,7 @@ public class IMManager {
}
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getUsersInfo(CommonUtil.getSDKJsonParam(methodCall), new BaseImpl(result));
Open_im_sdk.getUsersInfo(CommonUtil.getUidList(methodCall), new BaseImpl(result));
}
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {

@ -124,6 +124,10 @@ public class CommonUtil {
return getParamValue(methodCall, KEY_LOGIN_UID);
}
public static String getJsonUid(MethodCall methodCall) {
return JsonUtil.toString(getParamValue(methodCall, KEY_LOGIN_UID));
}
public static String getToken(MethodCall methodCall) {
return getParamValue(methodCall, KEY_LOGIN_TOKEN);
}
@ -247,6 +251,11 @@ public class CommonUtil {
return getParamValue(methodCall, KEY_CONVERSATION_PINNED);
}
public static String getUidList(MethodCall methodCall) {
return getSDKJsonParam(methodCall, KEY_USER_IDS);
}
//login
final static String KEY_LOGIN_UID = "uid";
final static String KEY_LOGIN_TOKEN = "token";
@ -283,4 +292,6 @@ public class CommonUtil {
final static String KEY_CONVERSATION_IDS = "conversationIDList";
final static String KEY_CONVERSATION_DRAFT = "draftText";
final static String KEY_CONVERSATION_PINNED = "isPinned";
// user info
final static String KEY_USER_IDS = "uidList";
}

Loading…
Cancel
Save