From 0892525c84045a2df912949c7bbc4df6b61f5468 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 8 Mar 2022 17:19:11 +0100 Subject: [PATCH] Adds debug logs --- .../internal/session/space/ResolveSpaceInfoTask.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt index 16a3511e32..9b0adad54b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt @@ -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.executeRequest import org.matrix.android.sdk.internal.task.Task +import timber.log.Timber import javax.inject.Inject internal interface ResolveSpaceInfoTask : Task { @@ -39,10 +40,12 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( private lateinit var params: ResolveSpaceInfoTask.Params override suspend fun execute(params: ResolveSpaceInfoTask.Params): SpacesResponse { - return executeRequest(globalErrorReceiver) { + val result = executeRequest(globalErrorReceiver) { this.params = params getSpaceHierarchy() } + Timber.w("Space Info result: $result") + return result } private suspend fun getSpaceHierarchy() = try { @@ -57,7 +60,9 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( suggestedOnly = params.suggestedOnly, limit = params.limit, maxDepth = params.maxDepth, - from = params.from) + from = params.from).also { + Timber.w("Spaces response stable: $it") + } private suspend fun getUnstableSpaceHierarchy() = spaceApi.getSpaceHierarchyUnstable( @@ -65,5 +70,7 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( suggestedOnly = params.suggestedOnly, limit = params.limit, maxDepth = params.maxDepth, - from = params.from) + from = params.from).also { + Timber.w("Spaces response unstable: $it") + } }