Browse Source

更新提示两个以上不提示的bug

master
vito 9 years ago
parent
commit
242b4b78db
  1. 15
      designer_base/src/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java

15
designer_base/src/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java

@ -3,8 +3,11 @@ package com.fr.design.extra.exe;
import com.fr.design.extra.PluginsReaderFromStore;
import com.fr.design.extra.Process;
import com.fr.general.FRLogger;
import com.fr.plugin.Plugin;
import com.fr.stable.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* Created by vito on 16/4/19.
@ -31,15 +34,13 @@ public class ReadUpdateOnlineExecutor implements Executor {
public void run(Process<String> process) {
try {
plugins = PluginsReaderFromStore.readPluginsForUpdate();
StringBuilder sb = new StringBuilder();
if (plugins != null) {
sb.append("[");
JSONArray jsonArray = new JSONArray();
for (Plugin plugin : plugins) {
sb.append("{pluginid:'").append(plugin.getId()).append("'}");
}
sb.append("]");
JSONObject jsonObject = new JSONObject();
jsonObject.put("pluginid", plugin.getId());
jsonArray.put(jsonObject);
}
result = sb.toString();
result = jsonArray.toString();
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage());
}

Loading…
Cancel
Save