Adds debug logs
This commit is contained in:
parent
510206aa8a
commit
0892525c84
|
@ -19,6 +19,7 @@ package org.matrix.android.sdk.internal.session.space
|
||||||
import org.matrix.android.sdk.internal.network.GlobalErrorReceiver
|
import org.matrix.android.sdk.internal.network.GlobalErrorReceiver
|
||||||
import org.matrix.android.sdk.internal.network.executeRequest
|
import org.matrix.android.sdk.internal.network.executeRequest
|
||||||
import org.matrix.android.sdk.internal.task.Task
|
import org.matrix.android.sdk.internal.task.Task
|
||||||
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal interface ResolveSpaceInfoTask : Task<ResolveSpaceInfoTask.Params, SpacesResponse> {
|
internal interface ResolveSpaceInfoTask : Task<ResolveSpaceInfoTask.Params, SpacesResponse> {
|
||||||
|
@ -39,10 +40,12 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor(
|
||||||
private lateinit var params: ResolveSpaceInfoTask.Params
|
private lateinit var params: ResolveSpaceInfoTask.Params
|
||||||
|
|
||||||
override suspend fun execute(params: ResolveSpaceInfoTask.Params): SpacesResponse {
|
override suspend fun execute(params: ResolveSpaceInfoTask.Params): SpacesResponse {
|
||||||
return executeRequest(globalErrorReceiver) {
|
val result = executeRequest(globalErrorReceiver) {
|
||||||
this.params = params
|
this.params = params
|
||||||
getSpaceHierarchy()
|
getSpaceHierarchy()
|
||||||
}
|
}
|
||||||
|
Timber.w("Space Info result: $result")
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getSpaceHierarchy() = try {
|
private suspend fun getSpaceHierarchy() = try {
|
||||||
|
@ -57,7 +60,9 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor(
|
||||||
suggestedOnly = params.suggestedOnly,
|
suggestedOnly = params.suggestedOnly,
|
||||||
limit = params.limit,
|
limit = params.limit,
|
||||||
maxDepth = params.maxDepth,
|
maxDepth = params.maxDepth,
|
||||||
from = params.from)
|
from = params.from).also {
|
||||||
|
Timber.w("Spaces response stable: $it")
|
||||||
|
}
|
||||||
|
|
||||||
private suspend fun getUnstableSpaceHierarchy() =
|
private suspend fun getUnstableSpaceHierarchy() =
|
||||||
spaceApi.getSpaceHierarchyUnstable(
|
spaceApi.getSpaceHierarchyUnstable(
|
||||||
|
@ -65,5 +70,7 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor(
|
||||||
suggestedOnly = params.suggestedOnly,
|
suggestedOnly = params.suggestedOnly,
|
||||||
limit = params.limit,
|
limit = params.limit,
|
||||||
maxDepth = params.maxDepth,
|
maxDepth = params.maxDepth,
|
||||||
from = params.from)
|
from = params.from).also {
|
||||||
|
Timber.w("Spaces response unstable: $it")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue