Minor code cleanup

This commit is contained in:
arkon
2020-01-07 19:20:08 -05:00
parent 0d5099f230
commit 5cddb269d6
67 changed files with 184 additions and 184 deletions
@@ -42,8 +42,8 @@ class MigrationPresenter(
.observeOn(AndroidSchedulers.mainThread())
.doOnNext { state = state.copy(sourcesWithManga = findSourcesWithManga(it)) }
.combineLatest(stateRelay.map { it.selectedSource }
.distinctUntilChanged(),
{ library, source -> library to source })
.distinctUntilChanged()
) { library, source -> library to source }
.filter { (_, source) -> source != null }
.observeOn(Schedulers.io())
.map { (library, source) -> libraryToMigrationItem(library, source!!.id) }
@@ -77,13 +77,13 @@ class SearchController(
.content(R.string.migration_dialog_what_to_include)
.items(MigrationFlags.titles.map { resources?.getString(it) })
.alwaysCallMultiChoiceCallback()
.itemsCallbackMultiChoice(preselected.toTypedArray(), { _, positions, _ ->
.itemsCallbackMultiChoice(preselected.toTypedArray()) { _, positions, _ ->
// Save current settings for the next time
val newValue = MigrationFlags.getFlagsFromPositions(positions)
preferences.migrateFlags().set(newValue)
true
})
}
.positiveText(R.string.migrate)
.negativeText(R.string.copy)
.neutralText(android.R.string.cancel)
@@ -98,4 +98,4 @@ class SearchController(
}
}
}