add logging to NetworkTimelineRemoteMediator

This commit is contained in:
Conny Duck 2023-05-08 19:27:00 +02:00
parent 3ac78c82c9
commit b18193e6c3
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@
package com.keylesspalace.tusky.components.timeline.viewmodel
import android.util.Log
import androidx.paging.ExperimentalPagingApi
import androidx.paging.LoadType
import androidx.paging.PagingState
@ -106,8 +107,13 @@ class NetworkTimelineRemoteMediator(
return MediatorResult.Success(endOfPaginationReached = statuses.isEmpty())
} catch (e: Exception) {
return ifExpected(e) {
Log.w(TAG, "Failed to load timeline", e)
MediatorResult.Error(e)
}
}
}
companion object {
private const val TAG = "NetworkTimelineRM"
}
}