Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/config/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <String>[
Expand Down
10 changes: 4 additions & 6 deletions lib/screens/widgets/items_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ class ItemsListView<T extends Item> extends StatelessWidget {
final bool hasRead = context.read<StoriesBloc>().hasRead(e);
final bool swipeGestureEnabled =
context.read<PreferenceCubit>().state.isSwipeGestureEnabled;
if (isHideInsteadOfMarkingGrayEnabled &&
context.watch<HideCubit>().isHidden(e.id)) {
return const <Widget>[];
}

return <Widget>[
if (shouldShowDivider && items.first.id != e.id)
Padding(
Expand Down Expand Up @@ -167,8 +164,9 @@ class ItemsListView<T extends Item> extends StatelessWidget {
)
else ...<Widget>[
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,
Expand Down
6 changes: 6 additions & 0 deletions lib/screens/widgets/stories_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ class _StoriesListViewState extends State<StoriesListView>
: const SizedBox.shrink(),
onMoreTapped: onMoreTapped,
itemBuilder: (Widget child, Story story) {
if (story.hidden) {
return const SizedBox.shrink();
} else if (preferenceState.isHideInsteadOfMarkingGrayEnabled &&
context.read<HideCubit>().isHidden(story.id)) {
return const SizedBox.shrink();
}
return Slidable(
key: ValueKey<Story>(story),
enabled: !preferenceState.isSwipeGestureEnabled,
Expand Down