Improves code formatting in ResolveSpaceInfoTask
This commit is contained in:
parent
a5af4783cc
commit
7226864cc9
|
@ -38,16 +38,14 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor(
|
||||||
) : ResolveSpaceInfoTask {
|
) : ResolveSpaceInfoTask {
|
||||||
|
|
||||||
override suspend fun execute(params: ResolveSpaceInfoTask.Params) = executeRequest(globalErrorReceiver) {
|
override suspend fun execute(params: ResolveSpaceInfoTask.Params) = executeRequest(globalErrorReceiver) {
|
||||||
getSpaceHierarchy(params)
|
try {
|
||||||
|
getSpaceHierarchy(params)
|
||||||
|
} catch (e: HttpException) {
|
||||||
|
getUnstableSpaceHierarchy(params)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getSpaceHierarchy(params: ResolveSpaceInfoTask.Params) = try {
|
private suspend fun getSpaceHierarchy(params: ResolveSpaceInfoTask.Params) =
|
||||||
getStableSpaceHierarchy(params)
|
|
||||||
} catch (e: HttpException) {
|
|
||||||
getUnstableSpaceHierarchy(params)
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun getStableSpaceHierarchy(params: ResolveSpaceInfoTask.Params) =
|
|
||||||
spaceApi.getSpaceHierarchy(
|
spaceApi.getSpaceHierarchy(
|
||||||
spaceId = params.spaceId,
|
spaceId = params.spaceId,
|
||||||
suggestedOnly = params.suggestedOnly,
|
suggestedOnly = params.suggestedOnly,
|
||||||
|
|
Loading…
Reference in New Issue