Commit 7a273f5f by Kim Peace

Fixed for push message handling from operation list activity

parent 30c20320
......@@ -210,39 +210,67 @@ public class OperationListActivity extends ABVUIActivity {
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.PushMessageKey.operationId))) {
final long operationId = Long.parseLong(getIntent().getStringExtra(AppDefType.PushMessageKey.operationId));
String message = getIntent().getStringExtra(AppDefType.PushMessageKey.message);
if (operationId > 0) {
if (operationId < 1) { return; }
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, getRString(R.string.app_name), message);
// リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(), R.string.work_report, getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.work_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
if (contentRefresher.isRefreshing()) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_refreshing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_meeting_room,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if (isShowingBatchSync()) {
// 一括同期中は移動しない
ErrorMessage.showErrorMessageToast(OperationListActivity.this, getString(R.string.msg_batch_sync_move_operation_view));
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
getString(R.string.msg_batch_sync_move_operation_view)
);
} else {
OperationDto operationDto = mOperationLogic.getOperation(operationId);
if (operationDto == null) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_no_operation,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else if (operationDto.needSyncFlg) {
// リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
ErrorMessage.showErrorMessageToast(
OperationListActivity.this,
PatternStringUtil.patternToInt(
getApplicationContext(),
R.string.msg_routineTask_report_disable_not_updated,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)
)
);
} else {
startTaskDirectionOrReportView(operationDto);
}
......@@ -250,7 +278,8 @@ public class OperationListActivity extends ABVUIActivity {
dialog.dismiss();
}
});
}
);
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
......@@ -260,15 +289,19 @@ public class OperationListActivity extends ABVUIActivity {
});
alertDialog.show();
}
// プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName))
&& getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0
) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
"",
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType)
);
}
// // プッシュメッセージがある場合
// else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
// getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
// ActivityHandlingHelper.getInstance().startChatWebviewActivity(
// getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
// getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
// }
}
private class JsInf {
......
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