Commit fcfa41f3 by Lee Munkyeong

OSごとに処理分離

parent 42b78026
...@@ -126,12 +126,15 @@ ...@@ -126,12 +126,15 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
android.saveSelectedUserList(""); android.getGlobalParameter();
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({}); android.saveSelectedUserList("");
webkit.messageHandlers.getGlobalParameter.postMessage({}); }
if (typeof(webkit) != "undefined") {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl; CMS_SERVER_URL = cmsServerUrl;
......
...@@ -129,31 +129,7 @@ ...@@ -129,31 +129,7 @@
</div> </div>
</a> </a>
</li> </li>
<div id="childGroupListArea"> <div id="childGroupListArea"></div>
<li class="d-flex align-items-center">
<a href="chat_room.html" class="w-100">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
<img src="icon/icon_folder.png" alt="フォルダ" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">子どもグループ</span>
</div>
</div>
</div>
</div>
</a>
<div class="chat_item_r">
<div class="d-flex flex-column">
<span class="star disable"></span>
</div>
</div>
</li>
</div>
<div id="userInGroupList"></div> <div id="userInGroupList"></div>
</ul> </ul>
</div> </div>
...@@ -227,11 +203,14 @@ ...@@ -227,11 +203,14 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({}); android.getGlobalParameter();
webkit.messageHandlers.getGlobalParameter.postMessage({}); }
if (typeof(webkit) != "undefined") {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
CMS_SERVER_URL = cmsServerUrl; CMS_SERVER_URL = cmsServerUrl;
......
...@@ -941,15 +941,18 @@ CHAT_UI.refreshContactScreen = function() { ...@@ -941,15 +941,18 @@ CHAT_UI.refreshContactScreen = function() {
}); });
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); if ( typeof(android) != "undefined") {
android.updateMyInfo(); android.updateGroupInfo('0');
android.updateGroupUser(); android.updateMyInfo();
android.updateFavorite(); android.updateGroupUser();
android.updateFavorite();
webkit.messageHandlers.updateGroupInfo.postMessage({'0'}); }
webkit.messageHandlers.updateMyInfo.postMessage({}); if ( typeof(webkit) != "undefined") {
webkit.messageHandlers.updateGroupUser.postMessage({}); webkit.messageHandlers.updateGroupInfo.postMessage({"groupId":"0"});
webkit.messageHandlers.updateFavorite.postMessage({}); webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
} }
var myInfo = CHAT_DB.getMyInfo(); var myInfo = CHAT_DB.getMyInfo();
...@@ -1024,8 +1027,11 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -1024,8 +1027,11 @@ CHAT_UI.refreshRoomList = function(roomType) {
} }
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateRoomList(); if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateRoomList.postMessage({}); webkit.messageHandlers.updateRoomList.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.updateRoomList();
}
} }
var rooms = CHAT_DB.getRoomList(roomType, null); var rooms = CHAT_DB.getRoomList(roomType, null);
CHAT.globalIsInvite = false; CHAT.globalIsInvite = false;
...@@ -1372,8 +1378,11 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) { ...@@ -1372,8 +1378,11 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
//オンライン状態であればサーバから情報更新。 //オンライン状態であればサーバから情報更新。
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo(groupId); if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateGroupInfo.postMessage({groupId}); webkit.messageHandlers.updateGroupInfo.postMessage({groupId});
} else if (CHAT_UTIL.isAndroid()) {
android.updateGroupInfo(groupId);
}
} }
//画面エリアを初期化。 //画面エリアを初期化。
......
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