From 4c0e89a81089d223f0169c7358a26af086ec54a6 Mon Sep 17 00:00:00 2001 From: Acexy Date: Thu, 11 Oct 2018 15:34:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86http=20api?= =?UTF-8?q?=E4=B8=BA=E5=BC=82=E6=AD=A5=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/thankjava/wqq/WQQClient.java | 9 +++++++-- .../thankjava/wqq/core/action/GetInfoAction.java | 1 - .../thankjava/wqq/core/action/LoginAction.java | 16 ---------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/thankjava/wqq/WQQClient.java b/src/main/java/com/thankjava/wqq/WQQClient.java index 9b03b71..3612cbf 100644 --- a/src/main/java/com/thankjava/wqq/WQQClient.java +++ b/src/main/java/com/thankjava/wqq/WQQClient.java @@ -75,8 +75,9 @@ public GroupsList getGroupsList(boolean isFromServer) { @Override public FriendsList getFriendsList(boolean isFromServer) { + FriendsList friendsList = null; if (isFromServer) { - FriendsList friendsList = getInfo.getFriendsList(); + friendsList = getInfo.getFriendsList(); if (friendsList == null) { return null; } else { @@ -86,7 +87,11 @@ public FriendsList getFriendsList(boolean isFromServer) { } } } - return session.getFriendsList(); + friendsList = session.getFriendsList(); + if (friendsList == null) { + friendsList = getFriendsList(true); + } + return friendsList; } } diff --git a/src/main/java/com/thankjava/wqq/core/action/GetInfoAction.java b/src/main/java/com/thankjava/wqq/core/action/GetInfoAction.java index 8e9536a..f7aa952 100644 --- a/src/main/java/com/thankjava/wqq/core/action/GetInfoAction.java +++ b/src/main/java/com/thankjava/wqq/core/action/GetInfoAction.java @@ -241,7 +241,6 @@ public void onListener(ActionListener actionListener) { * @date 2016年12月22日 下午1:56:17 * @version 1.0 */ - @Deprecated public GroupsList getGroupsList() { AsyncResponse response = null; GroupsList groupList = null; diff --git a/src/main/java/com/thankjava/wqq/core/action/LoginAction.java b/src/main/java/com/thankjava/wqq/core/action/LoginAction.java index d218089..e11d707 100644 --- a/src/main/java/com/thankjava/wqq/core/action/LoginAction.java +++ b/src/main/java/com/thankjava/wqq/core/action/LoginAction.java @@ -244,22 +244,6 @@ public void onListener(ActionListener actionListener) { } }); -// FriendsList friendsList = getInfo.getFriendsList(); -// if (friendsList == null) { -// logger.error("获取好友列表失败"); -// } else { -// friendsList = getInfo.getOnlineStatus(); -// if (friendsList == null) { -// logger.error("为好友列表查询在线状态失败"); -// } -// } -// getInfo.getGroupsList(); -// getInfo.getDiscusList(); -// getInfo.getSelfInfo(); -// getInfo.getRecentList(); - - - }