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

A few post sheet improvements #1391

Merged
merged 6 commits into from
Jun 25, 2024

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented May 29, 2024

Pull Request Description

This PR improves the post bottom sheet in a few ways (followup to #1199).

  • Remove ability to block oneself.
  • Immediately hide posts from blocked communities/users. (#298)
  • Ensure that Subscribe/Unsubscribe accurately reflects the current state.

Demo - Block

block-community-dismiss.mp4

@hjiangsu
Copy link
Member

hjiangsu commented Jun 8, 2024

Thanks for working on the dismiss for blocked communities and users, it looks great!

I just have one question:

Ensure that Subscribe/Unsubscribe accurately reflects the current state.

Does this only apply to the current post? (e.g., If I have multiple posts from a given community in the feed, but I subscribe to a community via a post card action, does the subscribed state apply to all other posts with that community?)

If not, then maybe a better way to handle this is to display a snackbar message when the subscribed action is successfully performed. I think the user will mostly understand that they have to refresh the feed to see that subscribed status.

@micahmo
Copy link
Member Author

micahmo commented Jun 9, 2024

Does this only apply to the current post?

If not, then maybe a better way to handle this is to display a snackbar message when the subscribed action is successfully performed.

Ahh, good catch, it did only apply to the given post. I replaced the update with a snackbar!

The only other options I could think of would be to (a) iterate through the whole feed and update all matching posts (might not be too bad) or (b) fetch the status every time opening the bottom sheet (wouldn't be great).

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 few minor comments!

lib/community/bloc/community_event.dart Outdated Show resolved Hide resolved
lib/community/bloc/community_bloc.dart Outdated Show resolved Hide resolved
@micahmo
Copy link
Member Author

micahmo commented Jun 25, 2024

Should be good now!

@hjiangsu hjiangsu merged commit c3c7ceb into thunder-app:develop Jun 25, 2024
1 check passed
@micahmo micahmo deleted the feature/post-sheet-improvements branch June 25, 2024 16:09
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