Draft
Conversation
# Conflicts: # app/build.gradle
# Conflicts: # .idea/androidTestResultsUserPreferences.xml # app/src/main/java/com/github/sdp_begreen/begreen/models/PhotoMetadata.kt
| } | ||
|
|
||
| override fun compareTo(other: PhotoMetadata): Int { | ||
| return takenOn?.date?.compareTo(other.takenOn?.date) ?: 0 |
There was a problem hiding this comment.
this is weird, the only thing that separates pictures in general is when they were taken?
Collaborator
Author
There was a problem hiding this comment.
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.
AlSchlo
reviewed
Apr 23, 2023
| @@ -0,0 +1,5 @@ | |||
| package com.github.sdp_begreen.begreen.data | |||
|
|
|||
| class FeedMediator { | |||
Collaborator
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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

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