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:
Ivan Kupalov 2020-09-20 18:43:28 +02:00 committed by GitHub
commit e4c10f1ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 150 additions and 65 deletions

View 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
)