Browse Source

REPORT-2801 关掉设计器获取论坛消息.

master
neil 8 years ago
parent
commit
277e0bfb48
  1. 12
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  2. 3
      designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java

12
designer_base/src/com/fr/design/extra/LoginWebBridge.java

@ -6,6 +6,7 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.ucenter.Client;
import com.fr.design.extra.ucenter.XMLHelper;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.ComparatorUtils;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONObject;
@ -108,9 +109,6 @@ public class LoginWebBridge {
if (StringUtils.isEmpty(userName)) {
return;
}
if (StringUtils.isNotEmpty(this.userName)) {
updateMessageCount();
}
this.userName = userName;
}
@ -143,15 +141,13 @@ public class LoginWebBridge {
if (getMessage.isServerAlive()) {
try {
String res = getMessage.getResponseText();
if (res.equals(FAILED_MESSAGE_STATUS)) {
} else {
if (!ComparatorUtils.equals(res, FAILED_MESSAGE_STATUS)) {
JSONObject jo = new JSONObject(res);
if (jo.getString("status").equals(SUCCESS_MESSAGE_STATUS)) {
if (SUCCESS_MESSAGE_STATUS.equals(jo.optString("status"))) {
setMessageCount(Integer.parseInt(jo.getString("message")));
}
}
} catch (Exception e) {
FRContext.getLogger().info(e.getMessage());
} catch (Exception ignore) {
}
}
sleep(CHECK_MESSAGE_TIME);

3
designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java

@ -38,9 +38,6 @@ public class PluginLoginExecutor implements Executor {
@Override
public void run(Process<String> process) {
String loginResult = LoginWebBridge.getHelper().login(username, password, uiLabel);
if (Integer.valueOf(loginResult) == 0) {
LoginWebBridge.getHelper().updateMessageCount();
}
result = loginResult;
}
}

Loading…
Cancel
Save