Commit 0ae400f1 by Takuya Ogawa

Merge branch 'features/1.3.0' into 'features/1.3.0_test'

Features/1.3.0

See merge request !58
parents accb8ff0 b6f1235f
......@@ -1583,6 +1583,14 @@ jQuery('#pills-confirm-tab').on('shown.bs.tab', function (e){
socket.on('showServerError', function (message){
console.log(message);
// #36174
// #36215
if(message.includes("SC_FORBIDDEN"))
{
alert('SC_FORBIDDEN');
return;
}
if (message == 'server error Ocurred') {
message = getLocalizedString("serverErrorOccured");
} else if (message == 'Room not found') {
......
......@@ -1434,4 +1434,5 @@
<string name="msg_chat_confirm_delete">このチャットルームを削除しますか?</string>
<string name="msg_error_chat_room_name_too_long">ルーム名は文字列20字以内に入力してください。</string>
<string name="msg_error_chat_name_has_invalid_character">特殊文字 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` はルーム名に含めることができません。</string>
<string name="msg_error_chat_room_sc_forbidden">認証に失敗しました。再度ログインが必要です。</string>
</resources>
......@@ -1442,4 +1442,5 @@
<string name="msg_chat_confirm_delete">이 방을 삭제 하시겠습니까?</string>
<string name="msg_error_chat_room_name_too_long">방 제목은 20자 이내로 입력해 주세요.</string>
<string name="msg_error_chat_name_has_invalid_character">특수문자 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` 는 방 제목에 포함될 수 없습니다.</string>
<string name="msg_error_chat_room_sc_forbidden">사용자 정보를 확인할 수 없습니다. 다시 로그인하시기 바랍니다.</string>
</resources>
\ No newline at end of file
......@@ -1440,4 +1440,5 @@
<string name="msg_chat_confirm_delete">Do you want to delete this room?</string>
<string name="msg_error_chat_room_name_too_long">Please enter room name less than 20 characters.</string>
<string name="msg_error_chat_name_has_invalid_character">The character ;/?:@&amp;=+$,-_.!~*\'()#\\\"` cannot be included in the roomname.</string>
<string name="msg_error_chat_room_sc_forbidden">Failed to authenticate. Please login again.</string>
</resources>
\ No newline at end of file
......@@ -190,6 +190,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
message = getString(R.string.msg_error_chat_room_name_too_long);
} else if (message.equals("InvalidSpecialCharacterRoomName")) {
message = getString(R.string.msg_error_chat_name_has_invalid_character);
} else if (message.equals("SC_FORBIDDEN")) {
message = getString(R.string.msg_error_chat_room_sc_forbidden);
} else {
message = message;
}
......@@ -208,7 +210,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@Override
public void onDismiss(DialogInterface dialog) {
// サーバと接続された場合、チャット画面を閉じる
if (tempMessage.equals(getString(R.string.msg_error_chat_disconnected))) {
if (tempMessage.equals(getString(R.string.msg_error_chat_disconnected)) || tempMessage.equals(getString(R.string.msg_error_chat_room_sc_forbidden))) {
mChatWebView.loadUrl("javascript:leaveRoom()");
finish();
} else if (tempMessage.equals(getString(R.string.msg_error_chat_join))) {
......
......@@ -619,6 +619,10 @@ public class LoginActivity extends ABVLoginActivity {
} else {
changeUserInit2();
}
// ユーザ変更があった場合、チャットのルーム情報をクリアする
clearChatLastRoom();
//ユーザ変更があった場合、FetchDateをクリアする
AcmsDao dao = AbstractDao.getDao(AcmsDao.class);
dao.clearFetchDate();
......@@ -690,4 +694,12 @@ public class LoginActivity extends ABVLoginActivity {
protected void goNext() {
showMainActivity(mLoginId);
}
// チャットのルーム情報をクリア
private void clearChatLastRoom() {
// 最後のチャットのルーム名
PreferenceUtil.putUserPref(getApplicationContext(), UserPrefKey.CHAT_LAST_ROOMNAME, "");
// 最後のチャットのルーム
PreferenceUtil.putUserPref(getApplicationContext(), UserPrefKey.CHAT_LAST_ROOMID, "");
}
}
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