mirror of
https://gitlab.shinice.net/pixeldroid/PixelDroid
synced 2024-12-25 06:23:58 +01:00
Update for paging dependency update
This commit is contained in:
parent
10bf68978d
commit
d13b34ed0d
@ -1,6 +1,7 @@
|
||||
package com.h.pixeldroid.posts.feeds.uncachedFeeds.profile
|
||||
|
||||
import androidx.paging.PagingSource
|
||||
import androidx.paging.PagingState
|
||||
import com.h.pixeldroid.utils.api.PixelfedAPI
|
||||
import com.h.pixeldroid.utils.api.objects.Status
|
||||
import retrofit2.HttpException
|
||||
@ -31,4 +32,9 @@ class ProfilePagingSource(
|
||||
LoadResult.Error(exception)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getRefreshKey(state: PagingState<String, Status>): String? =
|
||||
state.anchorPosition?.run {
|
||||
state.closestItemToPosition(this)?.id
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user