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 {
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 {
needSyncOperationList.add(operationDto);
}
} else {
for (OperationDto operationDto : mOperationDao.getAllOperation()) {
if (operationDto.needSyncFlg) {
needSyncOperationList.add(operationDto);
}
}
needSyncOperationList.addAll(mOperationDao.getNeedSyncAllOperation());
}
if (needSyncOperationList.size() > 0) {
categoryBatchSync(needSyncOperationList);
......@@ -2463,7 +2459,7 @@ public class OperationListActivity extends OperationActivity {
return;
}
mAutoSyncingFlg = true;
showProgressPopup();
showProgressPopup(getResources().getString(R.string.synchronizing));
CommonExecutor.execute(new Runnable() {
@Override
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