diff --git a/lib/config/constants.dart b/lib/config/constants.dart index 95e18843..095f0fb6 100644 --- a/lib/config/constants.dart +++ b/lib/config/constants.dart @@ -64,6 +64,7 @@ abstract class Constants { 'Download stories in settings to read stories offline', 'Open any Hacker News links in Hacki via the system share menu', '''Swipe right on a comment and tap the dots icon to search for the poster within the thread or across HN''', + '''Disabling `Mark Read Stories` in settings will clear your existing read history''', ].randomlyPicked!; static final String happyFace = [ diff --git a/lib/screens/widgets/items_list_view.dart b/lib/screens/widgets/items_list_view.dart index 65f8b85d..b0904d7b 100644 --- a/lib/screens/widgets/items_list_view.dart +++ b/lib/screens/widgets/items_list_view.dart @@ -88,10 +88,7 @@ class ItemsListView extends StatelessWidget { final bool hasRead = context.read().hasRead(e); final bool swipeGestureEnabled = context.read().state.isSwipeGestureEnabled; - if (isHideInsteadOfMarkingGrayEnabled && - context.watch().isHidden(e.id)) { - return const []; - } + return [ if (shouldShowDivider && items.first.id != e.id) Padding( @@ -167,8 +164,9 @@ class ItemsListView extends StatelessWidget { ) else ...[ GestureDetector( - /// If swipe gesture is enabled on home screen, use long press - /// instead of slide action to trigger the action menu. + /// If swipe gesture is enabled on home screen, use + /// long press instead of slide action to trigger + /// the action menu. onLongPress: swipeGestureEnabled ? () => onMoreTapped?.call(e, context.rect) : null, diff --git a/lib/screens/widgets/stories_list_view.dart b/lib/screens/widgets/stories_list_view.dart index 77dbbc90..fcf15247 100644 --- a/lib/screens/widgets/stories_list_view.dart +++ b/lib/screens/widgets/stories_list_view.dart @@ -168,6 +168,12 @@ class _StoriesListViewState extends State : const SizedBox.shrink(), onMoreTapped: onMoreTapped, itemBuilder: (Widget child, Story story) { + if (story.hidden) { + return const SizedBox.shrink(); + } else if (preferenceState.isHideInsteadOfMarkingGrayEnabled && + context.read().isHidden(story.id)) { + return const SizedBox.shrink(); + } return Slidable( key: ValueKey(story), enabled: !preferenceState.isSwipeGestureEnabled,