From 14b7baf56aa6b90d42c52c1d6b05db5b24fed202 Mon Sep 17 00:00:00 2001 From: S-6203-ATLED Date: Tue, 12 Jul 2022 12:33:11 +0900 Subject: [PATCH] =?UTF-8?q?#99=20=E3=82=AA=E3=83=95=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E6=99=82=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=88=E8=A1=A8=E7=A4=BA=E3=81=AE=E3=83=AC=E3=82=A4=E3=82=A2?= =?UTF-8?q?=E3=82=A6=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atled/agileworks/widget/AwAppWidgetRemoteViewsFactory.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/jp/atled/agileworks/widget/AwAppWidgetRemoteViewsFactory.kt b/app/src/main/java/jp/atled/agileworks/widget/AwAppWidgetRemoteViewsFactory.kt index 8c486a16..241b75c0 100644 --- a/app/src/main/java/jp/atled/agileworks/widget/AwAppWidgetRemoteViewsFactory.kt +++ b/app/src/main/java/jp/atled/agileworks/widget/AwAppWidgetRemoteViewsFactory.kt @@ -119,6 +119,11 @@ class AwAppWidgetRemoteViewsFactory(applicationContext: Context, intent: Intent? override fun getCount(): Int { Log.d(TAG, "call getCount(): " + (widgetItems?.count() ?: 0)) + // オフライン時、承認待ちウィジェットの場合、1を返す + if (approvalFilterCodes.size == 1) { + return widgetItems?.count() ?: approvalFilterCodes.size + } + // それ以外のまとまったウィジェットの場合、8を返す return widgetItems?.count() ?: 8 } -- GitLab