Skip to content

58 Feed with paging and linked to db#67

Draft
2Tricky4u wants to merge 14 commits intomasterfrom
58-feed-with-paging-and-DB
Draft

58 Feed with paging and linked to db#67
2Tricky4u wants to merge 14 commits intomasterfrom
58-feed-with-paging-and-DB

Conversation

@2Tricky4u
Copy link
Copy Markdown
Collaborator

@2Tricky4u 2Tricky4u commented Apr 20, 2023

This PR make the feed fragment dynamic with the DB.
It fetches all the post of users the current user is following. Sort it by date and go fetch the image by batches.

Paging Architecture
image

I began this PR far too early and decided to drop it as I needed the linking of posts with the database (by Ilias) and the following process (by Luca) to be done and we don't have time. So we can just cherry-pick codes from it

}

override fun compareTo(other: PhotoMetadata): Int {
return takenOn?.date?.compareTo(other.takenOn?.date) ?: 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is weird, the only thing that separates pictures in general is when they were taken?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's indeed strictly not right. I assumed that as the dates were containing milliseconds so the probability of a collision was for now pretty low and I was also just trying to program the simplest model working at this stage with paging 3 so that I could totally understand how to implement it with our actual feed.
Thank you for pointing that out.
I'll correct that for the not draft PR.

@@ -0,0 +1,5 @@
package com.github.sdp_begreen.begreen.data

class FeedMediator {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mhhhh

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it's pretty empty for now =D. I have good hopes it will be filled with useful stuff when I'll finally have tamed paging 3 with my final PR

@2Tricky4u 2Tricky4u self-assigned this May 1, 2023
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.

Make the feed connected to the database and thus accordingly growing, making it dynamical

3 participants