-
-
Notifications
You must be signed in to change notification settings - Fork 278
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 "Load More" Button on Home/Public Timeline #1283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works like a charm! Thank you for your work. 👍 🚀
As already mentioned elsewhere: The order of the statuses is weird sometimes after I pressed the "Load More"-button. I saw that using the displayed timestamps (I didn't run a debugger or so, sorry). What I could imagine is that it's about maxID
and sinceID
? But honestly: I don't know and don't consider this something blocking as it looks more like a UI-issue to me.
|
||
/// To find out wether or not we need to show the "Load More" button | ||
/// we have make sure to eventually overlap with the most recent cached item | ||
let sinceID = latestFeedRecords.count > 1 ? latestFeedRecords[1].id : "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reascon sinceID
is not an optional?
Both Timeline-calls support sinceID
being nil
and 1
as fallback confused me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have adopted this from the Android implementation, there sinceID
is also optional but when loading the Gaps it is explicitly using 1
which makes me assume the API has a different behavior when not setting the value at all.
This PR fixes the broken Gap Loading aka. "Load More".
Currently the "Load More"-button is never shown on the timeline, but there might be gaps in the timeline.