PollHistory : simplify so we only have one Node. Also enrich PollHistoryState.
This commit is contained in:
parent
4a2cbb1ed4
commit
aa9693126f
19 changed files with 376 additions and 255 deletions
|
|
@ -240,7 +240,7 @@ interface MatrixRoom : Closeable {
|
|||
*/
|
||||
fun getWidgetDriver(widgetSettings: MatrixWidgetSettings): Result<MatrixWidgetDriver>
|
||||
|
||||
suspend fun pollHistory(): MatrixTimeline
|
||||
fun pollHistory(): MatrixTimeline
|
||||
|
||||
override fun close() = destroy()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue