thunder-app / thunder

Thunder - An open-source cross-platform Lemmy client for iOS and Android built with Flutter
https://thunderapp.dev
GNU Affero General Public License v3.0
712 stars 62 forks source link

Optimistically mark replies as read #1314

Closed micahmo closed 2 weeks ago

micahmo commented 1 month ago

Pull Request Description

This PR adds optimistic updates for marking replies as read. It also adds the ability to mark as unread.

In case there is an error, a snackbar will be displayed which lets the user refresh the inbox to see the current state of things. (I thought that would be preferable over forcible re-showing a reply that may have been previously hidden, for example.)

Hide whitepsace.

Issue Being Fixed

Issue Number: #863

Screenshots / Recordings

https://github.com/thunder-app/thunder/assets/7417301/0863f48b-5d58-4282-91a1-a1a21a7b9060

Error case

Note that the error probably wouldn't happen as quickly if there were something like a timeout.

https://github.com/thunder-app/thunder/assets/7417301/5fe4b3f5-9e24-41da-9ccb-9756b4b7e9c4

Checklist