Removes debug logs
This commit is contained in:
parent
fb374b7374
commit
63cd79dc4f
|
@ -21,7 +21,7 @@ internal object NetworkConstants {
|
||||||
private const val URI_API_PREFIX_PATH = "_matrix/client"
|
private const val URI_API_PREFIX_PATH = "_matrix/client"
|
||||||
const val URI_API_PREFIX_PATH_ = "$URI_API_PREFIX_PATH/"
|
const val URI_API_PREFIX_PATH_ = "$URI_API_PREFIX_PATH/"
|
||||||
const val URI_API_PREFIX_PATH_R0 = "$URI_API_PREFIX_PATH/r0/"
|
const val URI_API_PREFIX_PATH_R0 = "$URI_API_PREFIX_PATH/r0/"
|
||||||
const val URI_API_PREFIX_PATH_V1 = "${URI_API_PREFIX_PATH}/v1/"
|
const val URI_API_PREFIX_PATH_V1 = "$URI_API_PREFIX_PATH/v1/"
|
||||||
const val URI_API_PREFIX_PATH_UNSTABLE = "$URI_API_PREFIX_PATH/unstable/"
|
const val URI_API_PREFIX_PATH_UNSTABLE = "$URI_API_PREFIX_PATH/unstable/"
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
|
|
|
@ -19,7 +19,6 @@ 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,20 +38,14 @@ 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) = 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 {
|
||||||
getStableSpaceHierarchy()
|
getStableSpaceHierarchy()
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
Timber.w("Stable space hierarchy failed: ${e.message}")
|
|
||||||
e.printStackTrace()
|
|
||||||
getUnstableSpaceHierarchy()
|
getUnstableSpaceHierarchy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,9 +55,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).also {
|
from = params.from)
|
||||||
Timber.w("Spaces response stable: $it")
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun getUnstableSpaceHierarchy() =
|
private suspend fun getUnstableSpaceHierarchy() =
|
||||||
spaceApi.getSpaceHierarchyUnstable(
|
spaceApi.getSpaceHierarchyUnstable(
|
||||||
|
@ -72,7 +63,5 @@ 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).also {
|
from = params.from)
|
||||||
Timber.w("Spaces response unstable: $it")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue