Commit f9af92e0 by NGUYEN HOANG SON

implement auto sync 1->7

parent f3cacd09
...@@ -82,6 +82,9 @@ public class ABVBatchSyncView extends ProgressDialog { ...@@ -82,6 +82,9 @@ 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) {
mOperationListActivity.autoSyncOperationDone(true);
}
return; return;
} }
// ベース資料のダウンロードチェック // ベース資料のダウンロードチェック
...@@ -97,6 +100,9 @@ public class ABVBatchSyncView extends ProgressDialog { ...@@ -97,6 +100,9 @@ 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) {
mOperationListActivity.autoSyncOperationDone(false);
}
return; return;
} }
// 同期処理 // 同期処理
......
...@@ -148,18 +148,7 @@ public abstract class OperationListHelper { ...@@ -148,18 +148,7 @@ public abstract class OperationListHelper {
adapter.setAdapterListener(new AbstractOperationAdapter.AbstractOperationListAdapterListener() { adapter.setAdapterListener(new AbstractOperationAdapter.AbstractOperationListAdapterListener() {
@Override @Override
public void openReport(OperationDto operationDto) { public void openReport(OperationDto operationDto) {
if (operationDto.contentId != null && operationDto.contentId != 0) { onClickReport(operationDto);
// 作業画面
mAppActivity.openReportView(operationDto);
} else {
if (operationDto.operationType == PANO) {
// パノラマ登録画面
mAppActivity.showPanoEntryDialog(operationDto);
} else {
// 何もしない
Logger.e("not open target");
}
}
} }
@Override @Override
...@@ -211,18 +200,7 @@ public abstract class OperationListHelper { ...@@ -211,18 +200,7 @@ public abstract class OperationListHelper {
adapter.setAdapterListener(new AbstractOperationAdapter.AbstractOperationListAdapterListener() { adapter.setAdapterListener(new AbstractOperationAdapter.AbstractOperationListAdapterListener() {
@Override @Override
public void openReport(OperationDto operationDto) { public void openReport(OperationDto operationDto) {
if (operationDto.contentId != null && operationDto.contentId != 0) { onClickReport(operationDto);
// 作業画面
mAppActivity.openReportView(operationDto);
} else {
if (operationDto.operationType == PANO) {
// パノラマ登録画面
mAppActivity.showPanoEntryDialog(operationDto);
} else {
// 何もしない
Logger.e("not open target");
}
}
} }
@Override @Override
...@@ -285,4 +263,24 @@ public abstract class OperationListHelper { ...@@ -285,4 +263,24 @@ public abstract class OperationListHelper {
*/ */
abstract protected List<OperationDto> findOperationList() throws Exception; abstract protected List<OperationDto> findOperationList() throws Exception;
public void onClickReport(OperationDto operationDto) {
if (mAppActivity.needAutoSync()) {
mAppActivity.autoSyncOpenOperationId = operationDto.operationId;
mAppActivity.autoSyncOperation();
return;
}
if (operationDto.contentId != null && operationDto.contentId != 0) {
// 作業画面
mAppActivity.openReportView(operationDto);
} else {
if (operationDto.operationType == PANO) {
// パノラマ登録画面
mAppActivity.showPanoEntryDialog(operationDto);
} else {
// 何もしない
Logger.e("not open target");
}
}
}
} }
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