Show message after archiving/unarchiving habits

This commit is contained in:
2025-09-14 18:24:35 -05:00
parent 0a4086ec8c
commit 542750207e
2 changed files with 34 additions and 7 deletions

View File

@@ -203,7 +203,8 @@ class ShowHabitActivity : AppCompatActivity(), CommandRunner.Listener {
}
private fun getPopupAnchor(): View? {
val dialog = supportFragmentManager.findFragmentByTag("historyEditor") as HistoryEditorDialog?
val dialog =
supportFragmentManager.findFragmentByTag("historyEditor") as HistoryEditorDialog?
return dialog?.dataView
}
@@ -216,6 +217,25 @@ class ShowHabitActivity : AppCompatActivity(), CommandRunner.Listener {
ShowHabitMenuPresenter.Message.COULD_NOT_EXPORT -> {
showMessage(resources.getString(R.string.could_not_export))
}
ShowHabitMenuPresenter.Message.HABIT_ARCHIVED -> {
showMessage(
resources.getQuantityString(
R.plurals.toast_habits_archived,
1
)
)
}
ShowHabitMenuPresenter.Message.HABIT_UNARCHIVED -> {
showMessage(
resources.getQuantityString(
R.plurals.toast_habits_unarchived,
1
)
)
}
else -> {}
}
}