aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/debugger
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-08-06 00:49:58 -0700
committerAllan Wang <me@allanwang.ca>2019-08-06 00:49:58 -0700
commit55bf3e4b5b4af5baa3c230ca82f74988608971a3 (patch)
tree3db856e037b70257aaef19e34db6b0856bda6412 /app/src/main/kotlin/com/pitchedapps/frost/debugger
parent99953f087f2c363dad05ae3f86b5bcba22484e43 (diff)
downloadfrost-55bf3e4b5b4af5baa3c230ca82f74988608971a3.tar.gz
frost-55bf3e4b5b4af5baa3c230ca82f74988608971a3.tar.bz2
frost-55bf3e4b5b4af5baa3c230ca82f74988608971a3.zip
Format kotlin
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/debugger')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/debugger/OfflineWebsite.kt17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/debugger/OfflineWebsite.kt b/app/src/main/kotlin/com/pitchedapps/frost/debugger/OfflineWebsite.kt
index 6bb50ccd..8215de03 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/debugger/OfflineWebsite.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/debugger/OfflineWebsite.kt
@@ -222,15 +222,16 @@ class OfflineWebsite(
}
}
- suspend fun loadAndZip(name: String, progress: (Int) -> Unit = {}): Boolean = withContext(Dispatchers.IO) {
- coroutineScope {
- val success = load { progress((it * 0.85f).toInt()) }
- if (!success) return@coroutineScope false
- val result = zip(name)
- progress(100)
- return@coroutineScope result
+ suspend fun loadAndZip(name: String, progress: (Int) -> Unit = {}): Boolean =
+ withContext(Dispatchers.IO) {
+ coroutineScope {
+ val success = load { progress((it * 0.85f).toInt()) }
+ if (!success) return@coroutineScope false
+ val result = zip(name)
+ progress(100)
+ return@coroutineScope result
+ }
}
- }
private fun downloadFile(url: String): Boolean {
return try {