Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hiding posts #1484

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Jul 9, 2024

Pull Request Description

This PR adds support for the ability to hide posts introduced in Lemmy 0.19.4.

  • There is a new swipe action and a new post sheet action.
  • The action color can be customized.
  • There is a new icon on posts that indicates whether they are hidden or not.

Unfortunately there does not seem to be a Lemmy account setting for whether to show/hide hidden posts in the feed, so for now I've added a Thunder setting. But we can migrate this to an account setting if it ever becomes available.

Notes:

  • If you configure the hide gesture and then use an instance which does not support the feature, the gesture will not be available. The post sheet action will also be hidden.
  • Unlike the web UI, hiding a post from Thunder will immediately dismiss it from the feed (if the user has chosen not to display hidden posts).
    • Auto-dismissal from the user's own user page is not yet supported, since it does not yet use the same feed widget as the general feed and other user pages. However, the hiding feature still works.

Issue Being Fixed

Issue Number: #1447

Screenshots / Recordings

Demo 1: Hide via swipe and button.

Demo1.mp4

Demo 2: Hide via swipe and button, respecting show hidden. Then unhide.

Demo2.mp4

Demo 3: Swipe and button are not visible on older instances.

Demo3.mp4

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo micahmo mentioned this pull request Jul 9, 2024
7 tasks
Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment! Otherwise LGTM

lib/community/utils/post_card_action_helpers.dart Outdated Show resolved Hide resolved
lib/community/widgets/post_card_view_comfortable.dart Outdated Show resolved Hide resolved
@hjiangsu hjiangsu merged commit ee7384e into thunder-app:develop Jul 16, 2024
1 check passed
@micahmo micahmo deleted the feature/hide-posts branch July 16, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants