|
@@ -652,7 +652,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
if (is_subaction) {
|
|
if (is_subaction) {
|
|
|
|
|
|
|
|
JSONObject sub_action = item_json.optJSONObject("item_" + subaction_tag);
|
|
JSONObject sub_action = item_json.optJSONObject("item_" + subaction_tag);
|
|
|
- int refresh = sub_action.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = sub_action.optBoolean("refresh");
|
|
|
boolean discardDirty =sub_action.optBoolean("discarddirty");
|
|
boolean discardDirty =sub_action.optBoolean("discarddirty");
|
|
|
String refresh_trigger = sub_action.optString("name");
|
|
String refresh_trigger = sub_action.optString("name");
|
|
|
JSONObject restore_json = sub_action.optJSONObject("restore");
|
|
JSONObject restore_json = sub_action.optJSONObject("restore");
|
|
@@ -782,7 +782,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
|
|
|
|
|
|
- if (refresh == 1) {
|
|
|
|
|
|
|
+ if (refresh) {
|
|
|
|
|
|
|
|
if (restore_json != null) {
|
|
if (restore_json != null) {
|
|
|
int rc = restore_json.optInt("count");
|
|
int rc = restore_json.optInt("count");
|
|
@@ -815,7 +815,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
|
|
// is_subaction
|
|
// is_subaction
|
|
|
} else {
|
|
} else {
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discardDirty");
|
|
boolean discardDirty = item_json.optBoolean("discardDirty");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
@@ -931,7 +931,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
|
|
|
|
|
|
- if (refresh != 1) {
|
|
|
|
|
|
|
+ if (!refresh) {
|
|
|
|
|
|
|
|
if (restore_json != null) {
|
|
if (restore_json != null) {
|
|
|
int rc = restore_json.optInt("count");
|
|
int rc = restore_json.optInt("count");
|
|
@@ -2524,7 +2524,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discard_dirty");
|
|
boolean discardDirty = item_json.optBoolean("discard_dirty");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
String subid=item_json.optString("subid");
|
|
String subid=item_json.optString("subid");
|
|
@@ -3657,7 +3657,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
|
|
|
|
|
JSONObject section_json = null;
|
|
JSONObject section_json = null;
|
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
String subid = item_json.optString("subid");
|
|
String subid = item_json.optString("subid");
|
|
@@ -3720,7 +3720,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
JSONObject section_json = null;
|
|
JSONObject section_json = null;
|
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
|
|
|
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
String subid = item_json.optString("subid");
|
|
String subid = item_json.optString("subid");
|
|
@@ -3762,7 +3762,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
|
|
|
|
|
adapter.notifyDataSetChanged();
|
|
adapter.notifyDataSetChanged();
|
|
|
|
|
|
|
|
- if (refresh == 1) {
|
|
|
|
|
|
|
+ if (refresh) {
|
|
|
refresh(refresh_trigger,discardDirty);
|
|
refresh(refresh_trigger,discardDirty);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3885,7 +3885,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
// e.printStackTrace();
|
|
// e.printStackTrace();
|
|
|
// }
|
|
// }
|
|
|
//
|
|
//
|
|
|
-// if (refresh == 1) {
|
|
|
|
|
|
|
+// if (refresh) {
|
|
|
// refresh(refresh_trigger,discardDirty);
|
|
// refresh(refresh_trigger,discardDirty);
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
@@ -4301,11 +4301,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
content_data_download.put("section_" + group,section_json);
|
|
content_data_download.put("section_" + group,section_json);
|
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
|
|
|
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
|
boolean partial_refresh = item_json.optBoolean("partial_refresh");
|
|
boolean partial_refresh = item_json.optBoolean("partial_refresh");
|
|
|
- if (refresh == 1) {
|
|
|
|
|
|
|
+ if (refresh) {
|
|
|
|
|
|
|
|
if (restore_json != null) {
|
|
if (restore_json != null) {
|
|
|
int rc = restore_json.optInt("count");
|
|
int rc = restore_json.optInt("count");
|
|
@@ -4328,7 +4328,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
}
|
|
}
|
|
|
refresh(refresh_trigger,discardDirty);
|
|
refresh(refresh_trigger,discardDirty);
|
|
|
|
|
|
|
|
- } // refresh == 1
|
|
|
|
|
|
|
+ } // refresh
|
|
|
else if (partial_refresh) {
|
|
else if (partial_refresh) {
|
|
|
|
|
|
|
|
String name = item_json.optString("name");
|
|
String name = item_json.optString("name");
|
|
@@ -4399,11 +4399,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
content_data_download.put("section_" + group,section_json);
|
|
content_data_download.put("section_" + group,section_json);
|
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
|
|
|
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
|
boolean partial_refresh = item_json.optBoolean("partial_refresh");
|
|
boolean partial_refresh = item_json.optBoolean("partial_refresh");
|
|
|
- if (refresh == 1) {
|
|
|
|
|
|
|
+ if (refresh) {
|
|
|
|
|
|
|
|
if (restore_json != null) {
|
|
if (restore_json != null) {
|
|
|
int rc = restore_json.optInt("count");
|
|
int rc = restore_json.optInt("count");
|
|
@@ -4426,7 +4426,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
}
|
|
}
|
|
|
refresh(refresh_trigger,discardDirty);
|
|
refresh(refresh_trigger,discardDirty);
|
|
|
|
|
|
|
|
- } // refresh == 1
|
|
|
|
|
|
|
+ } // refresh
|
|
|
else if (partial_refresh) {
|
|
else if (partial_refresh) {
|
|
|
|
|
|
|
|
String name = item_json.getString("name");
|
|
String name = item_json.getString("name");
|
|
@@ -4537,7 +4537,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
JSONObject section_json = null;
|
|
JSONObject section_json = null;
|
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
JSONObject item_json = content_data_control.optJSONArray(group).optJSONObject(child);
|
|
|
|
|
|
|
|
- int refresh = item_json.optInt("refresh");
|
|
|
|
|
|
|
+ boolean refresh = item_json.optBoolean("refresh");
|
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
boolean discardDirty = item_json.optBoolean("discarddirty");
|
|
|
String refresh_trigger = item_json.optString("name");
|
|
String refresh_trigger = item_json.optString("name");
|
|
|
String subid = item_json.optString("subid");
|
|
String subid = item_json.optString("subid");
|
|
@@ -4573,7 +4573,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
content_data_control = translateChange(content_data_download,changed_data);
|
|
|
|
|
|
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
JSONObject restore_json = item_json.optJSONObject("restore");
|
|
|
- if (refresh == 1) {
|
|
|
|
|
|
|
+ if (refresh) {
|
|
|
if (restore_json != null) {
|
|
if (restore_json != null) {
|
|
|
int rc = restore_json.optInt("count");
|
|
int rc = restore_json.optInt("count");
|
|
|
for(int ir=0;ir<rc;ir++) {
|
|
for(int ir=0;ir<rc;ir++) {
|