Sync is now essentially fully atomic on the client side

Sync now aborts on most errors instead of continuing
Sync now holds screen, CPU and WIFI locks
This commit is contained in:
NerdNumber9
2018-02-02 12:11:09 -05:00
parent e9bea8ed47
commit 8f51abfc97
9 changed files with 128 additions and 97 deletions

View File

@@ -43,10 +43,6 @@ fun String?.nullIfBlank(): String? = if(isNullOrBlank())
else
this
fun <T> ignore(expr: () -> T): T? {
return try { expr() } catch (t: Throwable) { null }
}
fun <K,V> Set<Map.Entry<K,V>>.forEach(action: (K, V) -> Unit) {
forEach { action(it.key, it.value) }
}