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
@@ -1,6 +1,5 @@
package exh.ui.batchadd
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -44,14 +43,14 @@ class BatchAddController : NucleusController<BatchAddPresenter>() {
.observeOn(AndroidSchedulers.mainThread())
.subscribeUntilDestroy {
progressSubscriptions.clear()
if(it == BatchAddPresenter.STATE_INPUT_TO_PROGRESS) {
if (it == BatchAddPresenter.STATE_INPUT_TO_PROGRESS) {
showProgress(this)
progressSubscriptions += presenter.progressRelay
.observeOn(AndroidSchedulers.mainThread())
.combineLatest(presenter.progressTotalRelay, { progress, total ->
//Show hide dismiss button
// Show hide dismiss button
progress_dismiss_btn.visibility =
if(progress == total)
if (progress == total)
View.VISIBLE
else View.GONE
@@ -79,7 +78,7 @@ class BatchAddController : NucleusController<BatchAddPresenter>() {
}?.let {
progressSubscriptions += it
}
} else if(it == BatchAddPresenter.STATE_PROGRESS_TO_INPUT) {
} else if (it == BatchAddPresenter.STATE_PROGRESS_TO_INPUT) {
hideProgress(this)
presenter.currentlyAddingRelay.call(BatchAddPresenter.STATE_IDLE)
}
@@ -124,8 +123,8 @@ class BatchAddController : NucleusController<BatchAddPresenter>() {
private fun formatProgress(progress: Int, total: Int) = "$progress/$total"
private fun addGalleries(galleries: String) {
//Check text box has content
if(galleries.isBlank()) {
// Check text box has content
if (galleries.isBlank()) {
noGalleriesSpecified()
return
}
@@ -8,7 +8,7 @@ import exh.GalleryAdder
import exh.metadata.nullIfBlank
import kotlin.concurrent.thread
class BatchAddPresenter: BasePresenter<BatchAddController>() {
class BatchAddPresenter : BasePresenter<BatchAddController>() {
private val galleryAdder by lazy { GalleryAdder() }
@@ -34,7 +34,7 @@ class BatchAddPresenter: BasePresenter<BatchAddController>() {
splitGalleries.forEachIndexed { i, s ->
val result = galleryAdder.addGallery(s, true)
if(result is GalleryAddEvent.Success) {
if (result is GalleryAddEvent.Success) {
succeeded.add(s)
} else {
failed.add(s)
@@ -46,7 +46,7 @@ class BatchAddPresenter: BasePresenter<BatchAddController>() {
}) + " " + result.logMessage)
}
//Show report
// Show report
val summary = "\nSummary:\nAdded: ${succeeded.size} gallerie(s)\nFailed: ${failed.size} gallerie(s)"
eventRelay?.call(summary)
}