Commit 63b27ee5 by NGUYEN HOANG SON

change property names: mAutoSyncingFlg, mAutoSyncOpenOperationId

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