diff --git a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebFragment.kt b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebFragment.kt index edd2335f422b3684291693a19fb1b49c34fe7454..dc446494a0b43e4e0d76cb1bda0475799699108a 100644 --- a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebFragment.kt +++ b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebFragment.kt @@ -55,7 +55,7 @@ class DocumentWebFragment : Fragment(), DocumentWebPresenter { //tokenチェック重複防止フラグ private var sessionflg = false // 書類表示時 URL - val docUrl = arrayOf("Mobile#docDetail", "#docDetail") + val docUrl = arrayOf("#docDetail", "#docCommentAdd", "#docAttachmentAdd") // スワイプのジェスチャー。折に触れて状態設定をする必要があるのでメンバーとして持つ。 // 必要とされるタイミング次第で null のままのことがある恐れがあるので lateinit にはしていない。 @@ -401,7 +401,8 @@ class DocumentWebFragment : Fragment(), DocumentWebPresenter { private fun reloadAfterConnect() { viewDataBinding.viewModel?.isReload?.value?.let { isReload -> - if (isReload) { + var offLineView = viewDataBinding.viewModel?.isDisconnectViewDisplay?.value ?: false + if (isReload && !offLineView) { if (lastUrl == null) { // タブ移動あり、一度もタブ選択(=webView生成)されていないタブを表示している状態でオンライン復帰 applyCookieManager(connectUrl, true) @@ -417,6 +418,9 @@ class DocumentWebFragment : Fragment(), DocumentWebPresenter { } private fun applyCookieManager(url: String?, urlLoading: Boolean) { + if (checkConnect() == false) { + return + } CookieManager.getInstance().apply { setupWebView() hideLoadingProgressBar()