Commit 63b27ee5 by NGUYEN HOANG SON

change property names: mAutoSyncingFlg, mAutoSyncOpenOperationId

parent 78c5c903
...@@ -82,7 +82,7 @@ public class ABVBatchSyncView extends ProgressDialog { ...@@ -82,7 +82,7 @@ public class ABVBatchSyncView extends ProgressDialog {
// Activity破棄フラグがtrue、またはスタックが存在しなければ、全て完了と見做す // Activity破棄フラグがtrue、またはスタックが存在しなければ、全て完了と見做す
closeProgressDialog(); closeProgressDialog();
Logger.d(TAG, "---batchSync is end"); Logger.d(TAG, "---batchSync is end");
if (mOperationListActivity != null && mOperationListActivity.isAutoSyncing) { if (mOperationListActivity != null && mOperationListActivity.mAutoSyncingFlg) {
mOperationListActivity.autoSyncOperationDone(true); mOperationListActivity.autoSyncOperationDone(true);
} }
return; return;
...@@ -100,7 +100,7 @@ public class ABVBatchSyncView extends ProgressDialog { ...@@ -100,7 +100,7 @@ public class ABVBatchSyncView extends ProgressDialog {
// error // error
showBatchSyncErrorAlert(peekOperationDto, mOperationListActivity.getString(R.string.msg_batch_sync_content_download_fail)); showBatchSyncErrorAlert(peekOperationDto, mOperationListActivity.getString(R.string.msg_batch_sync_content_download_fail));
} }
if (mOperationListActivity != null && mOperationListActivity.isAutoSyncing) { if (mOperationListActivity != null && mOperationListActivity.mAutoSyncingFlg) {
mOperationListActivity.autoSyncOperationDone(false); mOperationListActivity.autoSyncOperationDone(false);
} }
return; return;
......
...@@ -206,8 +206,8 @@ public class OperationListActivity extends OperationActivity { ...@@ -206,8 +206,8 @@ public class OperationListActivity extends OperationActivity {
// 作業種別のサービスオプション値を保持用フラグ // 作業種別のサービスオプション値を保持用フラグ
private boolean mOperationGroupMasterServiceOperationFlg; private boolean mOperationGroupMasterServiceOperationFlg;
public boolean isAutoSyncing; public boolean mAutoSyncingFlg;
public Long autoSyncOpenOperationId = null; public Long mAutoSyncOpenOperationId = null;
public Long mQrCodeOperationId = null; public Long mQrCodeOperationId = null;
// ビューの作成 // ビューの作成
...@@ -482,12 +482,12 @@ public class OperationListActivity extends OperationActivity { ...@@ -482,12 +482,12 @@ public class OperationListActivity extends OperationActivity {
setOperationListView(); setOperationListView();
} }
if (isAutoSync()) { if (isAutoSync()) {
if (isAutoSyncing) { if (mAutoSyncingFlg) {
if (result) { if (result) {
// content update success // content update success
List<OperationDto> needSyncOperationList = new ArrayList<>(); List<OperationDto> needSyncOperationList = new ArrayList<>();
if (autoSyncOpenOperationId != null) { if (mAutoSyncOpenOperationId != null) {
OperationDto operationDto = mOperationLogic.getOperation(autoSyncOpenOperationId); OperationDto operationDto = mOperationLogic.getOperation(mAutoSyncOpenOperationId);
if (operationDto.needSyncFlg) { if (operationDto.needSyncFlg) {
needSyncOperationList.add(operationDto); needSyncOperationList.add(operationDto);
} }
...@@ -2452,10 +2452,10 @@ public class OperationListActivity extends OperationActivity { ...@@ -2452,10 +2452,10 @@ public class OperationListActivity extends OperationActivity {
* Run refresh data and batch sync if need * Run refresh data and batch sync if need
*/ */
public void autoSyncOperation() { public void autoSyncOperation() {
if (isAutoSyncing) { if (mAutoSyncingFlg) {
return; return;
} }
isAutoSyncing = true; mAutoSyncingFlg = true;
showProgressView(PatternStringUtil.patternToString(getApplicationContext(), showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.synchronizing, R.string.synchronizing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
...@@ -2475,7 +2475,7 @@ public class OperationListActivity extends OperationActivity { ...@@ -2475,7 +2475,7 @@ public class OperationListActivity extends OperationActivity {
* @param operationId * @param operationId
*/ */
public void autoSyncOperationId(Long operationId) { public void autoSyncOperationId(Long operationId) {
autoSyncOpenOperationId = operationId; mAutoSyncOpenOperationId = operationId;
autoSyncOperation(); autoSyncOperation();
} }
...@@ -2484,14 +2484,16 @@ public class OperationListActivity extends OperationActivity { ...@@ -2484,14 +2484,16 @@ public class OperationListActivity extends OperationActivity {
* @param isSuccess * @param isSuccess
*/ */
public void autoSyncOperationDone(boolean isSuccess) { public void autoSyncOperationDone(boolean isSuccess) {
isAutoSyncing = false; mAutoSyncingFlg = false;
closeProgressPopup(); closeProgressPopup();
if (isSuccess) { if (isSuccess) {
if (autoSyncOpenOperationId != null) { if (mAutoSyncOpenOperationId != null) {
OperationDto operationDto = mOperationLogic.getOperation(autoSyncOpenOperationId); OperationDto operationDto = mOperationLogic.getOperation(mAutoSyncOpenOperationId);
openReportView(operationDto); if (!operationDto.needSyncFlg) {
openReportView(operationDto);
}
} }
} }
autoSyncOpenOperationId = null; mAutoSyncOpenOperationId = null;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment