mirror of
https://github.com/pachli/pachli-android.git
synced 2025-02-01 18:07:11 +01:00
55c12dde44
Previous code was inconsistent about how and when the FAB was hidden if the user had set the relevant preference. - Sometimes the FAB has hidden by setting the visibility to false, which removed it with no animation. - Sometimes the value of the preference was checked once, when the fragment or activity was created. - Some timelines didn't show the FAB (Hashtags, Favourites, Bookmarks, TrendingLinks, TrendingStatuses). - Logic for figuring out which `ComposeActivity` intent to use was scattered across different files. Improve this by: - Expose changes to the `FAB_HIDE` preference in the relevant viewmodels as a flow the UI component can collect. - Centralise the show/hide logic in a new `ActionButtonScrollListener` class, and always using `show()`/`hide()` to animate the transition. - Centralise the logic for creating the `ComposeActivity` intent in `TabViewData`.