add logging to NetworkTimelineRemoteMediator
This commit is contained in:
parent
3ac78c82c9
commit
b18193e6c3
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
package com.keylesspalace.tusky.components.timeline.viewmodel
|
package com.keylesspalace.tusky.components.timeline.viewmodel
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.paging.ExperimentalPagingApi
|
import androidx.paging.ExperimentalPagingApi
|
||||||
import androidx.paging.LoadType
|
import androidx.paging.LoadType
|
||||||
import androidx.paging.PagingState
|
import androidx.paging.PagingState
|
||||||
|
@ -106,8 +107,13 @@ class NetworkTimelineRemoteMediator(
|
||||||
return MediatorResult.Success(endOfPaginationReached = statuses.isEmpty())
|
return MediatorResult.Success(endOfPaginationReached = statuses.isEmpty())
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
return ifExpected(e) {
|
return ifExpected(e) {
|
||||||
|
Log.w(TAG, "Failed to load timeline", e)
|
||||||
MediatorResult.Error(e)
|
MediatorResult.Error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val TAG = "NetworkTimelineRM"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue