-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Saving place in for you feed when so that when the user returns to the app after closing it, they are returned to the last post they were looking at. - Saving place in for you feed - Updating home remote mediator so the first load will take into account your last position in the list - Adding a scroll up button that will show if there are new posts, but only if you haven't reached the top yet. --------- Co-authored-by: John Oberhauser <j.git-global@obez.io>
- Loading branch information
1 parent
fcb196a
commit 83dd24f
Showing
21 changed files
with
577 additions
and
156 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="32dp" | ||
android:height="32dp" | ||
android:viewportWidth="256" | ||
android:viewportHeight="256"> | ||
<path | ||
android:pathData="M205.66,138.34a8,8 0,0 1,-11.32 11.32L136,91.31V224a8,8 0,0 1,-16 0V91.31L61.66,149.66a8,8 0,0 1,-11.32 -11.32l72,-72a8,8 0,0 1,11.32 0ZM216,32H40a8,8 0,0 0,0 16H216a8,8 0,0 0,0 -16Z" | ||
android:fillColor="#000000"/> | ||
</vector> |
13 changes: 13 additions & 0 deletions
13
core/network/mastodon/src/main/java/social/firefly/core/network/mastodon/MarkersApi.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package social.firefly.core.network.mastodon | ||
|
||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
import social.firefly.core.network.mastodon.model.NetworkMarker | ||
|
||
interface MarkersApi { | ||
|
||
@GET("/api/v1/markers") | ||
suspend fun getMarkers( | ||
@Query("timeline[]") timelines: Array<String>?, | ||
): NetworkMarker | ||
} |
6 changes: 6 additions & 0 deletions
6
...etwork/mastodon/src/main/java/social/firefly/core/network/mastodon/model/NetworkMarker.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package social.firefly.core.network.mastodon.model | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Marks the user's current position in their timelines, | ||
* to synchronize and restore it across devices. | ||
*/ | ||
@Serializable | ||
data class NetworkMarker( | ||
/** | ||
* Home timeline marker. | ||
*/ | ||
@SerialName("home") | ||
val home: NetworkMarkerProperties, | ||
/** | ||
* Notifications timeline marker. | ||
*/ | ||
@SerialName("notifications") | ||
val notifications: NetworkMarkerProperties, | ||
) |
6 changes: 6 additions & 0 deletions
6
...todon/src/main/java/social/firefly/core/network/mastodon/model/NetworkMarkerProperties.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package social.firefly.core.network.mastodon.model | ||
|
||
import kotlinx.datetime.Instant | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Marks the current reading position on a specific timeline. | ||
*/ | ||
@Serializable | ||
data class NetworkMarkerProperties( | ||
/** | ||
* ID of the last read item. | ||
*/ | ||
@SerialName("last_read_id") | ||
val lastReadId: String, | ||
/** | ||
* Date at which this marker was updated. | ||
*/ | ||
@SerialName("updated_at") | ||
val updatedAt: Instant, | ||
/** | ||
* Used for locking to prevent write conflicts. | ||
*/ | ||
@SerialName("version") | ||
val version: Long, | ||
) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.