PollHistory : simplify so we only have one Node. Also enrich PollHistoryState.
This commit is contained in:
+1
-1
@@ -240,7 +240,7 @@ interface MatrixRoom : Closeable {
|
||||
*/
|
||||
fun getWidgetDriver(widgetSettings: MatrixWidgetSettings): Result<MatrixWidgetDriver>
|
||||
|
||||
suspend fun pollHistory(): MatrixTimeline
|
||||
fun pollHistory(): MatrixTimeline
|
||||
|
||||
override fun close() = destroy()
|
||||
}
|
||||
|
||||
+3
-3
@@ -23,9 +23,9 @@ import kotlinx.coroutines.flow.StateFlow
|
||||
interface MatrixTimeline : AutoCloseable {
|
||||
|
||||
data class PaginationState(
|
||||
val isBackPaginating: Boolean,
|
||||
val hasMoreToLoadBackwards: Boolean,
|
||||
val beginningOfRoomReached: Boolean,
|
||||
val isBackPaginating: Boolean = false,
|
||||
val hasMoreToLoadBackwards: Boolean = true,
|
||||
val beginningOfRoomReached: Boolean = false,
|
||||
) {
|
||||
val canBackPaginate = !isBackPaginating && hasMoreToLoadBackwards
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user