From 76e204be2c4c64e2c0779ac00eb46e2de9e09ca9 Mon Sep 17 00:00:00 2001 From: No3000 Date: Mon, 21 Oct 2024 19:05:16 +0200 Subject: [PATCH] BugFix: Mark displayed articles as read does not work when you close the app --- app/src/main/kotlin/entries/EntriesFragment.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/entries/EntriesFragment.kt b/app/src/main/kotlin/entries/EntriesFragment.kt index d491afd9..fd4b048d 100644 --- a/app/src/main/kotlin/entries/EntriesFragment.kt +++ b/app/src/main/kotlin/entries/EntriesFragment.kt @@ -106,9 +106,8 @@ class EntriesFragment : Fragment(), OnItemReselectedListener { } } - override fun onDestroyView() { - super.onDestroyView() - _binding = null + override fun onStop() { + super.onStop() val state = model.state.value @@ -122,6 +121,12 @@ class EntriesFragment : Fragment(), OnItemReselectedListener { } } + override fun onDestroyView() { + super.onDestroyView() + + _binding = null + } + override fun onNavigationItemReselected(item: MenuItem) { scrollToTop() }