Commit 9a530a5b by Lee Munkyeong

無駄なアップデート防止IF追加。

parent 4729e02e
......@@ -123,7 +123,7 @@ public class OperationLogic extends AbstractLogic {
List<OperationDto> serverOperations = json.operationList;
//サーバーからチャットプシュデータを取得
if (ABVDataCache.getInstance().serviceOption.isChat()) {
/*if (ABVDataCache.getInstance().serviceOption.isChat()) {
ChatPushDataJSON chatPushJson = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).getChatPushList(param);
for ( PushMessageDto dto : chatPushJson.pushMessageList) {
PushMessageDto dtoTemp = mPushMessageDao.selectChat(dto.pushMessageId, dto.operationId, dto.pushSendDate);
......@@ -131,7 +131,7 @@ public class OperationLogic extends AbstractLogic {
mPushMessageDao.insert(dto);
}
}
}
}*/
......
......@@ -369,13 +369,21 @@ public class OperationListActivity extends ABVUIActivity {
break;
}
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(tempOperationDto);
}
});
openReportView(tempOperationDto);
if (tempOperationDto.needSyncFlg) {
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(tempOperationDto, new Runnable() {
@Override
public void run() {
openReportView(tempOperationDto);
}
});
}
});
} else {
openReportView(tempOperationDto);
}
break;
case ABookKeys.CMD_KEY.GO_COMMUNICATION:
......@@ -384,13 +392,21 @@ public class OperationListActivity extends ABVUIActivity {
case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(panoramaOperationDto);
}
});
startTaskDirectionOrReportView(panoramaOperationDto);
if (panoramaOperationDto.needSyncFlg) {
runOnUiThread(new Runnable() {
@Override
public void run() {
startSyncOperation(panoramaOperationDto, new Runnable() {
@Override
public void run() {
startTaskDirectionOrReportView(panoramaOperationDto);
}
});
}
});
} else {
startTaskDirectionOrReportView(panoramaOperationDto);
}
break;
case ABookKeys.CMD_KEY.REFRESH_CONTENT:
......@@ -1387,7 +1403,7 @@ public class OperationListActivity extends ABVUIActivity {
* 同期処理
* @param operationDto
*/
public void startSyncOperation(final OperationDto operationDto) {
public void startSyncOperation(final OperationDto operationDto, final Runnable callback) {
//ネットワークチェック
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
......
......@@ -167,7 +167,7 @@ public abstract class OperationListHelper {
@Override
public void onSyncOperation(final OperationDto operationDto) {
// 同期処理
mAppActivity.startSyncOperation(operationDto);
mAppActivity.startSyncOperation(operationDto, null);
}
});
......@@ -235,7 +235,7 @@ public abstract class OperationListHelper {
@Override
public void onSyncOperation(final OperationDto operationDto) {
// 同期処理
mAppActivity.startSyncOperation(operationDto);
mAppActivity.startSyncOperation(operationDto, null);
}
});
......
......@@ -25,6 +25,7 @@ import android.widget.RelativeLayout;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
......@@ -40,6 +41,8 @@ import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
......@@ -72,6 +75,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private JsInf jsInf = new JsInf();
private ValueCallback<Uri[]> mUploadMessage;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
@Override
public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate");
......@@ -487,6 +492,15 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
finishActivity(); // 開いてる画面を閉じる
}
}
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
@Override
......
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