Optimize imports, disallow wildcard imports because of klint, run linter

This commit is contained in:
jobobby04
2020-04-04 16:30:05 -04:00
committed by Jobobby04
parent f18891a07e
commit 23ac3d18e5
138 changed files with 1192 additions and 1027 deletions
+7 -7
View File
@@ -1,18 +1,18 @@
package exh.ui
import java.util.UUID
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.util.*
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
typealias LoadingHandle = String
/**
* Class used to manage loader UIs
*/
class LoaderManager(parentContext: CoroutineContext = EmptyCoroutineContext): CoroutineScope {
class LoaderManager(parentContext: CoroutineContext = EmptyCoroutineContext) : CoroutineScope {
override val coroutineContext = Dispatchers.Main + parentContext
private val openLoadingHandles = mutableListOf<LoadingHandle>()
@@ -25,7 +25,7 @@ class LoaderManager(parentContext: CoroutineContext = EmptyCoroutineContext): Co
handle to (openLoadingHandles.size == 1)
}
if(shouldUpdateLoadingStatus) {
if (shouldUpdateLoadingStatus) {
launch {
updateLoadingStatus(true)
}
@@ -36,13 +36,13 @@ class LoaderManager(parentContext: CoroutineContext = EmptyCoroutineContext): Co
@Synchronized
fun closeProgressBar(handle: LoadingHandle?) {
if(handle == null) return
if (handle == null) return
val shouldUpdateLoadingStatus = synchronized(this) {
openLoadingHandles.remove(handle) && openLoadingHandles.isEmpty()
}
if(shouldUpdateLoadingStatus) {
if (shouldUpdateLoadingStatus) {
launch {
updateLoadingStatus(false)
}