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