fix crash when logging out while on conversations (#2895)

* fix crash when logging out while on conversations

* fix code formatting
This commit is contained in:
Konrad Pozniak 2022-11-22 20:36:07 +01:00 committed by GitHub
commit ff4ddf90b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View file

@ -0,0 +1,10 @@
package com.keylesspalace.tusky.util
import androidx.paging.PagingSource
import androidx.paging.PagingState
class EmptyPagingSource<T : Any> : PagingSource<Int, T>() {
override fun getRefreshKey(state: PagingState<Int, T>): Int? = null
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, T> = LoadResult.Page(emptyList(), null, null)
}