From c123be36314a6bc596fc6a05f98edad0490b3a33 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:55:08 +0100 Subject: [PATCH] improvement: log on close when collection is empty --- .../com/ichi2/widget/cardanalysis/CardAnalysisWidgetConfig.kt | 1 + .../java/com/ichi2/widget/deckpicker/DeckPickerWidgetConfig.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/AnkiDroid/src/main/java/com/ichi2/widget/cardanalysis/CardAnalysisWidgetConfig.kt b/AnkiDroid/src/main/java/com/ichi2/widget/cardanalysis/CardAnalysisWidgetConfig.kt index c84f75944d88..b9d544e4a13d 100644 --- a/AnkiDroid/src/main/java/com/ichi2/widget/cardanalysis/CardAnalysisWidgetConfig.kt +++ b/AnkiDroid/src/main/java/com/ichi2/widget/cardanalysis/CardAnalysisWidgetConfig.kt @@ -96,6 +96,7 @@ class CardAnalysisWidgetConfig : AnkiActivity(), DeckSelectionListener, BaseSnac // Check if the collection is empty before proceeding and if the collection is empty, show a toast instead of the configuration view. lifecycleScope.launch { if (isCollectionEmpty()) { + Timber.w("Closing: Collection is empty") showThemedToast( this@CardAnalysisWidgetConfig, R.string.app_not_initialized_new, diff --git a/AnkiDroid/src/main/java/com/ichi2/widget/deckpicker/DeckPickerWidgetConfig.kt b/AnkiDroid/src/main/java/com/ichi2/widget/deckpicker/DeckPickerWidgetConfig.kt index 6cbc63a87f63..811b6ff5db39 100644 --- a/AnkiDroid/src/main/java/com/ichi2/widget/deckpicker/DeckPickerWidgetConfig.kt +++ b/AnkiDroid/src/main/java/com/ichi2/widget/deckpicker/DeckPickerWidgetConfig.kt @@ -100,6 +100,7 @@ class DeckPickerWidgetConfig : AnkiActivity(), DeckSelectionListener, BaseSnackb // Check if the collection is empty before proceeding and if the collection is empty, show a toast instead of the configuration view. lifecycleScope.launch { if (isCollectionEmpty()) { + Timber.w("Closing: Collection is empty") showThemedToast( this@DeckPickerWidgetConfig, R.string.app_not_initialized_new,