Tusky-App-Android/app/src/main/java/com/keylesspalace/tusky/components
Nik Clayton 57e79b3f00
Save and restore the user's reading position more frequently (#3685)
The previous code gets the user's reading position *once*, when the
viewmodel is created, and uses that whenever it needs to be restored.

This is a problem. Suppose the user is a few days behind on their
notifications, and opens the app.

The reading position is restored, as expected. They scroll up to start
reading newer notifications.

Then they change their notification filters. This causes the
notifications list to change, and when it does their reading position
is set back to what it was when they first switched to the Notifications
tab.

Fix this by:

NotificationsFragment:
- Save the reading position whenever the user stops scrolling.

NotificationsViewModel:
- Use the saved reading position whenever the list of notifications
  can change, not just when the view model is created.
2023-05-23 20:07:39 +02:00
..
account Do not crash on empty relationship response 2023-04-05 10:54:03 +02:00
accountlist Make links in bios of follow request and follow notifications work (#3646) 2023-05-13 15:32:56 +02:00
announcements update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
compose Always publish image alt text 2023-04-24 11:48:40 +02:00
conversation Show the follower's bio/note in a "followed you" notification (#3281) 2023-04-24 12:09:34 +02:00
drafts update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
filters #3430: (fix) do not hide the anchor of the FAB (#3561) 2023-04-30 21:51:36 +02:00
followedtags update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
instanceinfo fix caching of instance defaults and emojis (#2643) 2022-08-07 22:18:53 +02:00
instancemute Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
login update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
notifications Save and restore the user's reading position more frequently (#3685) 2023-05-23 20:07:39 +02:00
preference Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
report Ensure text field has focus when reporting statuses 2023-05-04 14:53:27 +02:00
scheduled distinguish between different error types in ScheduledStatusActivity (#3487) 2023-03-30 18:52:24 +02:00
search Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
timeline Save the user's reading position in the home timeline (#3614) 2023-05-08 13:57:17 +02:00
trending Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
viewthread Fix crash in ViewThreadFragment.removeItem (#3622) 2023-05-05 12:03:42 +02:00