Commit c153ba62 by onuma

Merge branch 'develop_refactoring_onuma' into 'develop'

isOnile の判定を文字列からbool値に変更した。

See merge request !197
parents c565bd21 bf18ef8c
...@@ -28,7 +28,7 @@ var DeviceInfo = class { ...@@ -28,7 +28,7 @@ var DeviceInfo = class {
} }
isMobile() { isMobile() {
return this.isMoble == "true"; return this.isMoble == true;
} }
}; };
......
NativeBridgeDataSource.getMyUserInfo = function () { NativeBridgeDataSource.getMyUserInfo = function () {
if (typeof android != "undefined") { if (typeof android != "undefined") {
return JSON.parse(android.removeFavoriteGroup(groupID)); return JSON.parse(android.getMyUserInfo());
} else { } else {
return JSON.parse(callNativeApp(NATIVE_KEY_IOS.currentUserInfo, {})); return JSON.parse(callNativeApp(NATIVE_KEY_IOS.currentUserInfo, {}));
} }
......
...@@ -89,7 +89,7 @@ Common.dismissLoadingIndicator = function () { ...@@ -89,7 +89,7 @@ Common.dismissLoadingIndicator = function () {
}; };
Common.refreshForOnline = function () { Common.refreshForOnline = function () {
serverInfo.isOnline = "true"; serverInfo.isOnline = true;
$(".footer_item a").removeClass("ui-state-disabled"); $(".footer_item a").removeClass("ui-state-disabled");
if (typeof ChatList != "undefined") { if (typeof ChatList != "undefined") {
ChatList.refreshForOnline(); ChatList.refreshForOnline();
...@@ -103,7 +103,7 @@ Common.refreshForOnline = function () { ...@@ -103,7 +103,7 @@ Common.refreshForOnline = function () {
}; };
Common.refreshForOffline = function () { Common.refreshForOffline = function () {
serverInfo.isOnline = "false"; serverInfo.isOnline = false;
$(".footer_item a").addClass("ui-state-disabled"); $(".footer_item a").addClass("ui-state-disabled");
if (typeof ChatList != "undefined") { if (typeof ChatList != "undefined") {
ChatList.refreshForOffline(); ChatList.refreshForOffline();
......
...@@ -66,7 +66,7 @@ NativeBridgeDelegate.createChatRoom = function ( ...@@ -66,7 +66,7 @@ NativeBridgeDelegate.createChatRoom = function (
}; };
NativeBridgeDelegate.updateContactInfo = function () { NativeBridgeDelegate.updateContactInfo = function () {
if (serverInfo.isOnline != "true") { if (serverInfo.isOnline == false) {
return; return;
} }
NativeBridgeDelegate.updateGroupInfo("0"); NativeBridgeDelegate.updateGroupInfo("0");
...@@ -82,7 +82,7 @@ NativeBridgeDelegate.updateContactInfo = function () { ...@@ -82,7 +82,7 @@ NativeBridgeDelegate.updateContactInfo = function () {
}; };
NativeBridgeDelegate.updateGroupInfo = function (groupID) { NativeBridgeDelegate.updateGroupInfo = function (groupID) {
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
if (typeof android != "undefined") { if (typeof android != "undefined") {
// TODO: peacekim:: check this method is right or not // TODO: peacekim:: check this method is right or not
android.updateGroupUser(); android.updateGroupUser();
...@@ -192,7 +192,7 @@ NativeBridgeDelegate.goHome = function () { ...@@ -192,7 +192,7 @@ NativeBridgeDelegate.goHome = function () {
NativeBridgeDelegate.updatePreMessage = function (messageID) { NativeBridgeDelegate.updatePreMessage = function (messageID) {
if (typeof android != "undefined") { if (typeof android != "undefined") {
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
android.updatePreMessage(messageID); android.updatePreMessage(messageID);
} }
} else { } else {
......
...@@ -10,7 +10,7 @@ CHAT_SOCKET.socketCheck = function () { ...@@ -10,7 +10,7 @@ CHAT_SOCKET.socketCheck = function () {
}; };
CHAT_SOCKET.connectSocket = function () { CHAT_SOCKET.connectSocket = function () {
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
socket = io(serverInfo.chatURL); socket = io(serverInfo.chatURL);
setSocketAction(); setSocketAction();
} else { } else {
......
...@@ -115,7 +115,7 @@ ArchiveUI.refreshArchiveDetailScreen = function (archiveId) { ...@@ -115,7 +115,7 @@ ArchiveUI.refreshArchiveDetailScreen = function (archiveId) {
// 初期化 // 初期化
$("#archiveDetail").html(""); $("#archiveDetail").html("");
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
NativeBridgeDelegate.updateArchiveDetail(archiveId); NativeBridgeDelegate.updateArchiveDetail(archiveId);
} }
...@@ -303,7 +303,7 @@ ArchiveUI.refreshArchiveScreen = function () { ...@@ -303,7 +303,7 @@ ArchiveUI.refreshArchiveScreen = function () {
const archiveTemplate = getTemplate(TemplateURL.ARCHIVE); const archiveTemplate = getTemplate(TemplateURL.ARCHIVE);
// アーカイブ一覧取得 // アーカイブ一覧取得
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
NativeBridgeDelegate.updateArchiveList(); NativeBridgeDelegate.updateArchiveList();
} }
......
...@@ -58,7 +58,7 @@ ChatList.bindChatSearch = function () { ...@@ -58,7 +58,7 @@ ChatList.bindChatSearch = function () {
}; };
ChatList.refreshRoomList = function (roomType) { ChatList.refreshRoomList = function (roomType) {
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
Common.refreshForOnline(); Common.refreshForOnline();
} else { } else {
Common.refreshForOffline(); Common.refreshForOffline();
...@@ -76,7 +76,7 @@ ChatList.refreshRoomList = function (roomType) { ...@@ -76,7 +76,7 @@ ChatList.refreshRoomList = function (roomType) {
ChatList.selectTab(roomType); ChatList.selectTab(roomType);
// update room info in native db // update room info in native db
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
NativeBridgeDelegate.updateRoomList(); NativeBridgeDelegate.updateRoomList();
} }
......
...@@ -78,7 +78,7 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) { ...@@ -78,7 +78,7 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
let roomID = joinRoomID.replace(/['"]+/g, ""); let roomID = joinRoomID.replace(/['"]+/g, "");
roomName = joinRoomName; roomName = joinRoomName;
// 画面更新 // 画面更新
if (serverInfo.isOnline == "true") { if (serverInfo.isOnline == true) {
Common.refreshForOnline(); Common.refreshForOnline();
NativeBridgeDelegate.updateMessages(roomID); NativeBridgeDelegate.updateMessages(roomID);
} else { } else {
......
...@@ -155,7 +155,7 @@ CollaborationUI.insertFavoriteUserInCollaboration = function (shopMemberID) { ...@@ -155,7 +155,7 @@ CollaborationUI.insertFavoriteUserInCollaboration = function (shopMemberID) {
}; };
CollaborationUI.refreshForOffline = function () { CollaborationUI.refreshForOffline = function () {
serverInfo.isOnline = "false"; serverInfo.isOnline = false;
if (typeof coview_api == "undefined") { if (typeof coview_api == "undefined") {
return; 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