Fix display in 'import settings' screen

Only show 'general settings' as an option when the settings file actually contains general settings.
This commit is contained in:
cketti 2021-02-07 18:46:31 +01:00
parent 6a63698baf
commit 9ad2f07a5f

View file

@ -233,7 +233,10 @@ class SettingsImportViewModel(
.mapIndexed { index, account -> index to account.uuid }
.toMap(mutableMapOf())
val items = mutableListOf<SettingsListItem>(SettingsListItem.GeneralSettings())
val items = mutableListOf<SettingsListItem>()
if (contents.globalSettings) {
items.add(SettingsListItem.GeneralSettings())
}
contents.accounts.mapIndexedTo(items) { index, accountDescription ->
SettingsListItem.Account(index, accountDescription.name)
}