Commit 623c61f2 by Lee Munkyeong

Merge branch 'features/#529_ルーム開設アラート' into 'features/abcomm_sp6'

ルーム開設画面からルーム開設する場合既存のルームがあればアラート表示

See merge request !114
parents 0849a133 80b422e4
...@@ -83,6 +83,10 @@ public interface ABookCommConstants { ...@@ -83,6 +83,10 @@ public interface ABookCommConstants {
} }
interface FLAG { interface FLAG {
interface SCREEN_FLG {
Integer NAME_CARD = 0;
Integer MAKE_ROOM = 1;
}
interface SELF_FLAG { interface SELF_FLAG {
Integer OFF = 0; Integer OFF = 0;
Integer ON = 1; Integer ON = 1;
......
...@@ -1478,6 +1478,7 @@ ...@@ -1478,6 +1478,7 @@
<string name="msg_error_chat_room_name_too_long">ルーム名は文字列20字以内に入力してください。</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_name_has_invalid_character">特殊文字 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` はルーム名に含めることができません。</string>
<string name="msg_error_chat_room_sc_forbidden">認証に失敗しました。再度ログインが必要です。</string> <string name="msg_error_chat_room_sc_forbidden">認証に失敗しました。再度ログインが必要です。</string>
<string name="msg_error_already_exist_same_room">同じルームが既に存在します。</string>
<!-- 連続作業 --> <!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string> <string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
......
...@@ -1485,4 +1485,5 @@ ...@@ -1485,4 +1485,5 @@
<string name="msg_error_chat_name_has_invalid_character">특수문자 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` 는 방 제목에 포함될 수 없습니다.</string> <string name="msg_error_chat_name_has_invalid_character">특수문자 ;/?:@&amp;=+$,-_.!~*\'()#\\\"` 는 방 제목에 포함될 수 없습니다.</string>
<string name="msg_error_chat_room_sc_forbidden">사용자 정보를 확인할 수 없습니다. 다시 로그인하시기 바랍니다.</string> <string name="msg_error_chat_room_sc_forbidden">사용자 정보를 확인할 수 없습니다. 다시 로그인하시기 바랍니다.</string>
<string name="msg_error_all_process_delete">모두 삭제 송신에 실패하였습니다.</string> <string name="msg_error_all_process_delete">모두 삭제 송신에 실패하였습니다.</string>
<string name="msg_error_already_exist_same_room">동일한 채팅방이 이미 존재합니다.</string>
</resources> </resources>
\ No newline at end of file
...@@ -1482,4 +1482,5 @@ ...@@ -1482,4 +1482,5 @@
<string name="msg_error_chat_name_has_invalid_character">The character ;/?:@&amp;=+$,-_.!~*\'()#\\\"` cannot be included in the roomname.</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> <string name="msg_error_chat_room_sc_forbidden">Failed to authenticate. Please login again.</string>
<string name="msg_error_all_process_delete">Failed to send all deletes.</string> <string name="msg_error_all_process_delete">Failed to send all deletes.</string>
<string name="msg_error_already_exist_same_room">Already exist same room.</string>
</resources> </resources>
...@@ -819,8 +819,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity { ...@@ -819,8 +819,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
} }
@JavascriptInterface @JavascriptInterface
public void createChatRoom(String roomType, String userIdList, String encodedRoomName) throws NetworkDisconnectedException, AcmsException { public void createChatRoom(String roomType, String userIdList, String encodedRoomName, String screenFlg) throws NetworkDisconnectedException, AcmsException {
CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId); CreatedRoomJSON resultJson = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).createRoom(sid, roomType, userIdList, encodedRoomName, loginId);
if ( ABookCommConstants.FLAG.SCREEN_FLG.MAKE_ROOM.equals(Integer.parseInt(screenFlg))) {
ChatRoomDto chatRoomDto = communicationLogic.getChatRoom(resultJson.chatRoomDto.chatRoomId);
if (chatRoomDto != null) {
mChatWebView.post(new Runnable() {
@Override
public void run() {
mChatWebView.loadUrl(String.format("javascript:alert('"+getString(R.string.msg_error_already_exist_same_room)+"');"));
}
});
return;
}
}
communicationLogic.insertChatRoom(resultJson.chatRoomDto); communicationLogic.insertChatRoom(resultJson.chatRoomDto);
communicationLogic.addUserInRoom(StringUtil.join(",", userIdList, shopMemberId.toString()), resultJson.chatRoomDto.chatRoomId); communicationLogic.addUserInRoom(StringUtil.join(",", userIdList, shopMemberId.toString()), resultJson.chatRoomDto.chatRoomId);
final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId; final Integer chatRoomId = resultJson.chatRoomDto.chatRoomId;
......
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