Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sort type handling, and fetching initData/Posts, fixes default sort in community #1166

Merged
merged 8 commits into from
Aug 15, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Aug 10, 2023

Refactors

  • Fixes community sort not using the default home sort
  • Fixes swap account not changing the sort
  • Show toast when saving usersettings fails
  • Refactors homeFetch/initialdata, instead of putting the responsibility on each action that changes user to properly update the sort/home fetch data, now HomeActivity itself takes care of it.
  • SiteViewmodel now properly updates the default in Account, basically since the navscope changes we were ignoring the local DB defaults, previously it waited until /site responded before fetching home posts, now it instantly fetches using the info from the account.

Fixes #1163
Fixes #886

Note: since account default sort/list types haven't been updates since like 0.34, many will be out of date, thus when those user launch it, it will fetch the home posts twice, once with those settings from that account and once /site is retrieved and updates the account default which triggers another fetch but with the latest sort.

@MV-GH MV-GH changed the title Refactor sort type handling, and fetching initData/Posts Refactor sort type handling, and fetching initData/Posts, fixes default sort in community Aug 10, 2023
MV-GH added 3 commits August 11, 2023 18:02
# Conflicts:
#	app/src/main/java/com/jerboa/model/HomeViewModel.kt
#	app/src/main/java/com/jerboa/model/SiteViewModel.kt
#	app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt
@twizmwazin twizmwazin enabled auto-merge (squash) August 14, 2023 22:44
@twizmwazin twizmwazin merged commit ace82a0 into LemmyNet:main Aug 15, 2023
@MV-GH MV-GH deleted the refactor/startup_sort_stuff branch August 15, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants