Commit 0c39bacd by NGUYEN HOANG SON

fix get need sync all operation and loading msg

parent 11946954
...@@ -606,4 +606,8 @@ public class OperationDao extends AbstractDao { ...@@ -606,4 +606,8 @@ public class OperationDao extends AbstractDao {
Logger.e(TAG, e); Logger.e(TAG, e);
} }
} }
public List<OperationDto> getNeedSyncAllOperation() {
return rawQueryGetDtoList("select tp.*, rpc.content_id from t_operation AS tp left outer join r_operation_content AS rpc on tp.operation_id = rpc.operation_id where tp.need_sync_flg = 1", null, OperationDto.class);
}
} }
...@@ -492,11 +492,7 @@ public class OperationListActivity extends OperationActivity { ...@@ -492,11 +492,7 @@ public class OperationListActivity extends OperationActivity {
needSyncOperationList.add(operationDto); needSyncOperationList.add(operationDto);
} }
} else { } else {
for (OperationDto operationDto : mOperationDao.getAllOperation()) { needSyncOperationList.addAll(mOperationDao.getNeedSyncAllOperation());
if (operationDto.needSyncFlg) {
needSyncOperationList.add(operationDto);
}
}
} }
if (needSyncOperationList.size() > 0) { if (needSyncOperationList.size() > 0) {
categoryBatchSync(needSyncOperationList); categoryBatchSync(needSyncOperationList);
...@@ -2463,7 +2459,7 @@ public class OperationListActivity extends OperationActivity { ...@@ -2463,7 +2459,7 @@ public class OperationListActivity extends OperationActivity {
return; return;
} }
mAutoSyncingFlg = true; mAutoSyncingFlg = true;
showProgressPopup(); showProgressPopup(getResources().getString(R.string.synchronizing));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
......
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