Commit 61794f96 by Lee Munkyeong

最初データロードタイミング問題対応

parent 796d09a3
......@@ -161,13 +161,12 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private void initializeWebView() {
initiateDatas(getIntent());
setupDefaultChatWebViewURL();
setupChatWebView();
registChatRoomPageLoader();
registJSReactor();
addDownloadListener();
observeNetworkChange();
loadWebViewResource();
setupDefaultChatWebViewURL();
}
private void initiateDatas(Intent intent) {
......@@ -188,6 +187,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
chatWebviewUrl = NETWORK_ERROR_PLACE_HOLDER;
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
registChatRoomPageLoader();
Logger.d("DEVICE_NOT_CONNECTED_NETWORK:");
return;
}
......@@ -212,6 +212,16 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
updateAllGroupInfo();
updateFavoriteInfo();
shopMemberId = communicationLogic.getMyShopMemberDto().shopMemberId;
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
registChatRoomPageLoader();
} catch (Exception e) {
Logger.d("registChatRoomPageLoader Error");
}
}
});
closeProgressPopup();
} catch (Exception e) {
Logger.d("Update error");
......@@ -224,6 +234,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
mChatWebView = findViewById(R.id.chatWebview2);
mChatWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); //オーバースクロールしない。
mChatWebView.setVerticalScrollBarEnabled(false); //スクロールバーを消す。
mChatWebView.addJavascriptInterface(jsInf, "android");
WebSettings settings = mChatWebView.getSettings();
settings.setJavaScriptEnabled(true); //Javascriptを有効にする。
settings.setAppCacheEnabled(true);
......@@ -250,7 +261,6 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
// 最後のチャットのルーム
String lastRoomId = PreferenceUtil.getUserPref(getApplicationContext(), AppDefType.UserPrefKey.CHAT_LAST_ROOMID, "");
mChatWebView.addJavascriptInterface(jsInf, "android");
String fixedParam = "&platform=android&isMobile=true&chatServerUrl=" + ABVEnvironment.getInstance().websocketServerHttpUrl;
//ページをロード
if (roomId != 0 && roomName != null) { // by push message
......
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