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

Load more messages #246

Merged
merged 6 commits into from
Feb 13, 2021
Merged

Load more messages #246

merged 6 commits into from
Feb 13, 2021

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Feb 11, 2021

This seems to be working well for me. @stefanhofman's original pagination implementation is great, all that I've done is reverted back to a regular VStack (after trying a LazyVStack) as it doesn't seem to be recommended to use a list or lazy stack for content with variable content size (also it doesn't seem possible to hide the table view separators on a List since iOS 14 so that was a dead end).

I added a ProgressView spinner at the top of the list which triggers the pagination whenever it comes into view. Needs some future work to hide the spinner if there's no more messages to load.

stefanhofman and others added 5 commits February 6, 2021 15:30
Changed the ScrollView to a List view, because .onAppear does not work well on ScrollViews
#16
…ith non-fixed height elements. Add a loading spinner to ReverseList and when it's in frame load more messages.
@kiliankoe
Copy link
Member

omg :O

The changes look great and it works really well! Passing up the visibility through the preference key is so cool.

@kiliankoe kiliankoe linked an issue Feb 13, 2021 that may be closed by this pull request
@kiliankoe kiliankoe merged commit c94ac20 into stable Feb 13, 2021
@pixlwave pixlwave deleted the load-more-messages branch February 13, 2021 09:47
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.

Load older events/history in conversation view
3 participants