Commit 99c6b374 by Lee Munkyeong

Merge branch 'features/1.4.100_develop' into 'features/1.4.100'

ローディングバ修正。

See merge request !209
parents a0a1b730 ed7cb992
......@@ -200,11 +200,11 @@ public class ContentRefresher {
resendLog(); // ログ送信
contractLogic.initializeContractServiceOption(); // サービスオプション関連処理
if (mProgressCallback != null) {
mProgressCallback.callback(3);
mProgressCallback.callback(10);
}
groupLogic.initializeGroups(); // グループ設定(グループ変更の場合、FetchDateをクリアする)
if (mProgressCallback != null) {
mProgressCallback.callback(7);
mProgressCallback.callback(5);
}
categoryLogic.initializeCategories(); // カテゴリ設定
// 絞り検索マスタデータの最新更新された時のFetchDateを一時に保存する。
......@@ -226,7 +226,7 @@ public class ContentRefresher {
if (interrupt) { // この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
Logger.d(TAG, "stop refresh worker before content update.");
setFail();
updateRefreshContentListState(-1L, null);
updateRefreshContentListState(-1L, null, mProgressCallback);
return;
}
isFinishedContentCheck = retrieveServerContent(localContents, mProgressCallback); // ContentVersionAPIを呼出し新規と更新の場合ContentInfoをDLする
......@@ -341,6 +341,12 @@ public class ContentRefresher {
List<ContentDto> serverContents = json.contentVersions;
// DTO Info:contentId, metaVersion, resourceVersion, contentNameKana, readerShareFlg
int progressPercent = 0;
if (CollectionUtil.isNotEmpty(serverContents) && serverContents.size() != 0) {
progressPercent = 50 / serverContents.size() < 1 ? 1 : 50 / serverContents.size();
}
int totalProgress = 0;
for (ContentDto serverContentDto : serverContents) {
while (isBusyRefreshingContent()) {
if (interrupt) {
......@@ -379,10 +385,12 @@ public class ContentRefresher {
}
}
}
if (mProgressCallback != null && totalProgress < 50) {
mProgressCallback.callback(progressPercent);
totalProgress = totalProgress + progressPercent;
}
}
if (mProgressCallback != null) {
mProgressCallback.callback(5);
}
return true;
}
......@@ -400,8 +408,12 @@ public class ContentRefresher {
// 新着処理が終わったら以下の処理が実行
try {
// サーバー通信でプロジェクト取得
mCallBack.callback(3);
operationLogic.initializeOperations(mCallBack);
if(mCallBack != null) {
mCallBack.callback(5);
operationLogic.initializeOperations(mCallBack);
} else {
operationLogic.initializeOperations();
}
} catch (Exception e1) {
Logger.e(TAG, e1);
e = e1;
......
......@@ -113,7 +113,7 @@ public class OperationLogic extends AbstractLogic {
public void initializeOperations(Callback mCallBack) throws AcmsException, NetworkDisconnectedException {
// 作業グループリスト取得
setWorkingGroupList();
mCallBack.callback(20);
mCallBack.callback(5);
// 作業一覧取得し、登録・更新・削除する
retrieveServerOperation(mCallBack);
}
......@@ -436,9 +436,6 @@ public class OperationLogic extends AbstractLogic {
mContentLogic.deleteContent(contentDto, true);
}
}
if (mCallBack != null) {
mCallBack.callback(5);
}
String operationTaskDirPath = ABVEnvironment.getInstance().getOperationDirFile(deleteOperationDto.operationId);
FileUtil.delete(operationTaskDirPath);
......
......@@ -355,7 +355,7 @@ public class OperationListActivity extends ABVUIActivity {
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
showProgressView(getString(R.string.msg_common_processing));
}
});
......@@ -377,7 +377,7 @@ public class OperationListActivity extends ABVUIActivity {
}
};
try {
dataRefresh(true);
dataRefresh(true, progressCallback);
} catch (Exception e) {
handler.post(new Runnable() {
@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