Run default Android Studio formatter on code

This commit is contained in:
arkon
2020-02-17 17:23:37 -05:00
parent a1fadce7c6
commit 3ecc883944
109 changed files with 640 additions and 585 deletions
@@ -109,10 +109,10 @@ class SettingsBackupController : SettingsController() {
onClick {
val currentDir = preferences.backupsDirectory().getOrDefault()
try{
try {
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
startActivityForResult(intent, CODE_BACKUP_DIR)
} catch (e: ActivityNotFoundException){
} catch (e: ActivityNotFoundException) {
// Fall back to custom picker on error
startActivityForResult(preferences.context.getFilePicker(currentDir), CODE_BACKUP_DIR)
}
@@ -111,7 +111,7 @@ class SettingsLibraryController : SettingsController() {
key = Keys.libraryUpdateCategories
titleRes = R.string.pref_library_update_categories
entries = categories.map { it.name }.toTypedArray()
entryValues = categories.map { it.id.toString() }.toTypedArray()
entryValues = categories.map { it.id.toString() }.toTypedArray()
preferences.libraryUpdateCategories().asObservable()
.subscribeUntilDestroy {
val selectedCategories = it
@@ -171,7 +171,8 @@ class SettingsLibraryController : SettingsController() {
defaultValue = "-1"
val selectedCategory = categories.find { it.id == preferences.defaultCategory() }
summary = selectedCategory?.name ?: context.getString(R.string.default_category_summary)
summary = selectedCategory?.name
?: context.getString(R.string.default_category_summary)
onChange { newValue ->
summary = categories.find {
it.id == (newValue as String).toInt()