Commit e1d1f60d by Kim Jinsung

Merge branch 'communication/develop_44464' into 'communication/develop'

Bug #44464 文書協業接続して、閉じて、プッシュメッセージからもう一度招待プッシュメッセージ受信すると、 作業一覧画面でプッシュメッセージが表示され、移動すると何もしない

See merge request !226
parents 1097d66e 3574cb4b
......@@ -1319,10 +1319,6 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 協業
String messageText = json.getMessage();
if (json.isCollaboration()) {
messageText = getString(R.string.msg_invite_collaboration);
}
Intent pushMsgDialog = new Intent(context, ShowPushMessageDailogActivity.class);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.message, messageText);
pushMsgDialog.putExtra(AppDefType.PushMessageKey.data, json.getData());
......
......@@ -124,24 +124,31 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
isMeetingRoomConnected = MeetingManager.getInstance().isConnected();
isCollabration = MeetingManager.getInstance().isCollaboration();
Bundle extras = getIntent().getExtras();
if (extras != null && !isMeetingRoomConnected) {
if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog();
} else {
if (extras != null) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
} else {
moveChatRoom(extras);
}
finish();
}
if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog();
}
dialog.dismiss();
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
dialog.dismiss();
}
});
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
finish();
}
});
......@@ -161,6 +168,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
ChatWebViewActivity chatWebViewActivity= activityHandlingHelper.getChatWebViewActivity();
if (chatWebViewActivity != null) {
chatWebViewActivity.reloadRoomViewCollaboration(roomId, roomName, collaborationType);
} else {
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),"");
} else {
......@@ -173,6 +184,7 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
}
}
}
}
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
......
......@@ -820,20 +820,18 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
if (startPIP) {
Intent intent = new Intent();
intent.setClass(this, ChatWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra(ABookCommConstants.KEY.SID, chatData.sid);
intent.putExtra(ABookCommConstants.KEY.ROOM_ID, chatData.roomId);
intent.putExtra(ABookCommConstants.KEY.ROOM_NAME, chatData.roomName);
intent.putExtra(ABookCommConstants.KEY.ROOM_TYPE, chatData.roomType);
intent.putExtra(ABookCommConstants.KEY.LOGIN_ID, chatData.loginId);
intent.putExtra(ABookCommConstants.KEY.SHOP_NAME, chatData.shopName);
intent.putExtra(ABookCommConstants.KEY.COLLABORATION_TYPE, chatData.getStrCollaborationType());
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
getApplication().startActivity(intent);
activityHandlingHelper.getCurrentActivity().startActivity(intent);
collaborationType = Integer.toString(0);
startPIP = false;
finish();
}
}
......@@ -1355,6 +1353,8 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
public void exitMeetingRoom() {
exitAndDeleteMeetingRoom();
finishPIPMode();
//関連資料画面閉じる
ActivityHandlingHelper.getInstance().finishCollaborationOperationRelatedContentActivity();
}
public void finishPIP() {
......@@ -1391,4 +1391,17 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
// 最後のチャットのルーム
PreferenceUtil.putUserPref(getApplicationContext(), AppDefType.UserPrefKey.CHAT_LAST_ROOMID, roomId);
}
/**
* プッシュメッセージ受信し、既にChatWebViewActivityが表示中の時、WebViewリロードする。
* @param roomId ルームID
* @param roomName ルーム名
* @param collaborationType 協業タイプ
*/
public void reloadRoomViewCollaboration(Long roomId, String roomName, String collaborationType) {
chatData.roomId = roomId;
chatData.roomName = roomName;
chatData.setStrCollaborationType(collaborationType);
registChatRoomPageLoader();
}
}
......@@ -851,6 +851,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
}
/**
* 文書協業用の関連資料画面を閉じる
*/
public void finishCollaborationOperationRelatedContentActivity() {
if (!currentActivityStack.isEmpty()) {
for (ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof OperationRelatedContentActivity) {
activity.finish();
break;
}
}
}
}
public Stack<ABVAuthenticatedActivity> getCurrentActivityStack() {
return currentActivityStack;
}
......@@ -1871,6 +1885,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
/**
* 使用中のChatWebViewActivityを返す
* @return 使用中のChatWebViewActivity
*/
public ChatWebViewActivity getChatWebViewActivity() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof ChatWebViewActivity) {
return (ChatWebViewActivity)activity;
}
}
}
return null;
}
/**
* 設定画面から戻る用
* @return 設定画面へ遷移前の画面
*/
......
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