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

Fix conversations #2556

Merged
merged 14 commits into from
May 30, 2022
Merged

Fix conversations #2556

merged 14 commits into from
May 30, 2022

Conversation

connyduck
Copy link
Collaborator

@connyduck connyduck commented May 25, 2022

This fixes several problems with conversations (the code is basically just taken over from the newer timeline code)

  • timestamps now update on pull-to-refresh
  • the view now jumps up a bit to reveal newly loaded items after pull-to-refresh
  • "nothing here" shown when conversations are empty instead of nothing
  • when replying from conversations, the "replying to" field will be correctly filled
  • the "fabHide" setting is now respected in the ConversationsFragment as well
  • and most importantly, pagination now works as expected

kind of a prerequisite to #2552

I'd like to merge this at the same time as #2549 because the migrations overlap

@connyduck
Copy link
Collaborator Author

draft because some details still aren't perfect

@connyduck connyduck marked this pull request as ready for review May 27, 2022 16:51
@connyduck
Copy link
Collaborator Author

While this is a hundred times better than before, there are still 2 glitches:

  • When the database is empty and conversations load for the first time, the list does not start at the top and one has to scroll up. I think is because of the load state footer that is shown and the recyclerview trying to keep the position. No idea how to turn this behavior off, I tried a lot.
  • When having a long list of conversations and being way down, suddenly jumping up shows the wrong views for a split second. This is because paging from database does not hold all data in memory. We have the same behavior in timelines.

Copy link
Collaborator

@charlag charlag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a not so confident with all the paging APIs but maybe it's worth leaving a comment on how/why order works? I don't understand it fully, does server not reorder them all the time?

@connyduck
Copy link
Collaborator Author

I'm a not so confident with all the paging APIs but maybe it's worth leaving a comment on how/why order works? I don't understand it fully, does server not reorder them all the time?

Yes it does reorder it all the time but I also reload it all the time. After a pull to refresh there is only the current page in the cache.

connyduck added 2 commits May 30, 2022 18:15
# Conflicts:
#	app/schemas/com.keylesspalace.tusky.db.AppDatabase/38.json
#	app/src/main/java/com/keylesspalace/tusky/db/AppDatabase.java
@connyduck connyduck merged commit 131309e into develop May 30, 2022
@connyduck connyduck deleted the fix_conversations branch May 30, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants