Tusky-App-Android/app/src/main/java/com/keylesspalace/tusky
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
..
adapter Make links in bios of follow request and follow notifications work (#3646) 2023-05-13 15:32:56 +02:00
appstore Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
components Save and restore the user's reading position more frequently (#3685) 2023-05-23 20:07:39 +02:00
db Save the a copy of the notification marker ID locally (#3672) 2023-05-18 23:23:42 +02:00
di Only fetch and display a given notification once (#3626) 2023-05-13 16:00:28 +02:00
entity FilterResult.status_matches is a List<String>? (#3634) 2023-05-09 17:56:48 +02:00
fragment Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
interfaces Support the mastodon 4 filter api (#3188) 2023-03-11 13:12:50 +01:00
json update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
network updateMarkersWithAuth(): Require DOMAIN header (#3660) 2023-05-16 18:24:38 +02:00
pager Keep the tabs adapter over the life of the viewpager (#3255) 2023-02-15 19:17:59 +01:00
receiver Only fetch and display a given notification once (#3626) 2023-05-13 16:00:28 +02:00
service Always publish image alt text 2023-04-24 11:48:40 +02:00
settings Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
usecase Remove Rx from EventHub and TimelineCases (#3446) 2023-03-18 10:11:47 +01:00
util Remove unused class PairedList (#3602) 2023-04-30 21:49:05 +02:00
view Force a layout pass to ensure spans are measured correctly (#3600) 2023-04-30 21:50:52 +02:00
viewdata update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
viewmodel update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
AboutActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
AccountsInListFragment.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
BaseActivity.java Code cleanups (#3264) 2023-02-20 19:58:37 +01:00
BottomSheetActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
EditProfileActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
LicenseActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
ListsActivity.kt 3430: Make list refresh/retry consistent (#3474) 2023-03-30 19:29:42 +02:00
MainActivity.kt Use the tab's contentDescription as the toolbar title (#3609) 2023-05-04 13:19:44 +02:00
SplashActivity.kt remove legacy notification channel cleanup (#2550) 2022-05-25 20:54:25 +02:00
StatusListActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
TabData.kt Convert NotificationsFragment and related code to Kotlin, use the Paging library (#3159) 2023-03-10 20:12:33 +01:00
TabPreferenceActivity.kt 3416: Call the list activity when list list empty (#3426) 2023-03-30 21:23:08 +02:00
TuskyApplication.kt 3204: Add an account based preference store (#3205) 2023-02-27 14:07:28 +01:00
ViewMediaActivity.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00