Improves code formatting in ResolveSpaceInfoTask

This commit is contained in:
ericdecanini 2022-03-10 21:41:17 +01:00
parent a5af4783cc
commit 7226864cc9
1 changed files with 6 additions and 8 deletions

View File

@ -38,16 +38,14 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor(
) : ResolveSpaceInfoTask {
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 {
getStableSpaceHierarchy(params)
} catch (e: HttpException) {
getUnstableSpaceHierarchy(params)
}
private suspend fun getStableSpaceHierarchy(params: ResolveSpaceInfoTask.Params) =
private suspend fun getSpaceHierarchy(params: ResolveSpaceInfoTask.Params) =
spaceApi.getSpaceHierarchy(
spaceId = params.spaceId,
suggestedOnly = params.suggestedOnly,