Improve notifications fetching (#1930)
* Improve notifications fetching - Only fetch notifications up to the latest fetched one - Use timeline markers to avoid showing already seen notifications * Apply some of the suggestions
This commit is contained in:
parent
17b7abb537
commit
e4c10f1ca4
7 changed files with 150 additions and 65 deletions
15
app/src/main/java/com/keylesspalace/tusky/entity/Marker.kt
Normal file
15
app/src/main/java/com/keylesspalace/tusky/entity/Marker.kt
Normal file
|
@ -0,0 +1,15 @@
|
|||
package com.keylesspalace.tusky.entity
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* API type for saving the scroll position of a timeline.
|
||||
*/
|
||||
data class Marker(
|
||||
@SerializedName("last_read_id")
|
||||
val lastReadId: String,
|
||||
val version: Int,
|
||||
@SerializedName("updated_at")
|
||||
val updatedAt: Date
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue