From 524103a04a2e9101e974d2482dfe2f48137b25d6 Mon Sep 17 00:00:00 2001 From: Azuma Kasumi Date: Wed, 22 Mar 2023 10:13:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AA=E3=83=95=E3=83=A9=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=83=93=E3=83=A5=E3=83=BC=20=E8=A1=A8=E7=A4=BA=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E8=BF=BD=E5=8A=A0=20/=20=E6=93=8D=E4=BD=9C=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agileworks/view/ui/documentweb/DocumentWebFragment.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 edd2335f..dc446494 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() -- GitLab