Skip to content

Commit

Permalink
improvement: log on close when collection is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
david-allison committed Sep 18, 2024
1 parent 63d527e commit c123be3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c123be3

Please sign in to comment.