From a3bdd894f09968b8ab8495512b9ad5f5d7480b03 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sat, 6 Jul 2024 18:32:35 +0200 Subject: [PATCH] improve filters v1 loading (#4545) A user still on Mastodon 3 complained that since my change in https://github.com/tuskyapp/Tusky/pull/4539 the timeline reloads on starting Tusky. Well, we need to do some reloading of the timeline after loading the v1 filters or they won't work. Changing the `fullReload` to `invalidate` improves the situation by not loading everything from the network again (just the database) but there is still some noticeable loading. (I'm not willing to invest any more time to support these old instances) --- .../tusky/components/timeline/viewmodel/TimelineViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt index 8fe22419d..5bfc16cd5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/TimelineViewModel.kt @@ -93,7 +93,7 @@ abstract class TimelineViewModel( is FilterUpdatedEvent -> { if (filterContextMatchesKind(this@TimelineViewModel.kind, event.filterContext)) { filterModel.init(kind.toFilterKind()) - fullReload() + invalidate() } } }