Skip to content

Commit 5c66c4c

Browse files
committed
refactor: remove redundant use of the context inside runBlocking method
1 parent 649eaae commit 5c66c4c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

owncloudApp/src/main/java/com/owncloud/android/presentation/accounts/ManageAccountsViewModel.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ class ManageAccountsViewModel(
9494
}
9595

9696
fun hasEnoughQuota(accountName: String): Boolean = runBlocking(CoroutinesDispatcherProvider().io) {
97-
val quota = withContext(CoroutinesDispatcherProvider().io) {
98-
getStoredQuotaUseCase(GetStoredQuotaUseCase.Params(accountName))
99-
}
97+
val quota = getStoredQuotaUseCase(GetStoredQuotaUseCase.Params(accountName))
10098
quota.getDataOrNull()?.available != 0L
10199
}
102100
}

0 commit comments

Comments
 (0)