wip: Instrument calls to refresh the cached timeline

A user report shows what appears to be spurious / unexpected calls to
refresh the cached timeline occuring while scrolling. Have confirmed
these calls aren't coming from any Pachli code, so adding additional
instrumentation that can be included in a custom APK to debug further.
This commit is contained in:
Nik Clayton 2024-03-03 18:58:42 +01:00
parent 69c258365b
commit 447abfee90
No known key found for this signature in database
GPG Key ID: F95268159C2EC897
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class CachedTimelineRemoteMediator(
return try {
val response = when (loadType) {
LoadType.REFRESH -> {
Timber.e(RuntimeException(), "Stack trace for LoadType.REFRESH")
val closestItem = state.anchorPosition?.let {
state.closestItemToPosition(maxOf(0, it - (state.config.pageSize / 2)))
}?.status?.serverId