mirror of https://github.com/tuskyapp/Tusky.git
Browse Source
* fix crash when logging out while on conversations * fix code formattingpull/2910/head
4 changed files with 21 additions and 13 deletions
@ -1,11 +0,0 @@
|
||||
package com.keylesspalace.tusky.components.timeline.viewmodel |
||||
|
||||
import androidx.paging.PagingSource |
||||
import androidx.paging.PagingState |
||||
import com.keylesspalace.tusky.db.TimelineStatusWithAccount |
||||
|
||||
class EmptyTimelinePagingSource : PagingSource<Int, TimelineStatusWithAccount>() { |
||||
override fun getRefreshKey(state: PagingState<Int, TimelineStatusWithAccount>): Int? = null |
||||
|
||||
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, TimelineStatusWithAccount> = LoadResult.Page(emptyList(), null, null) |
||||
} |
||||
@ -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) |
||||
} |
||||
Loading…
Reference in new issue