Commit 61794f96 by Lee Munkyeong

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

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