Browse Source

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

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

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

Loading…
Cancel
Save