[Config] Fix only notes card visible on new profiles.

This commit is contained in:
Kuba Szczodrzyński 2021-10-30 21:47:59 +02:00
parent 52968cafad
commit cb953ea8a8

View File

@ -37,8 +37,10 @@ class ProfileConfigMigration(config: ProfileConfig) {
}
if (dataVersion < 3) {
ui.homeCards = ui.homeCards.toMutableList().also {
it.add(HomeCardModel(config.profileId, HomeCard.CARD_NOTES))
if (ui.homeCards.isNotEmpty()) {
ui.homeCards = ui.homeCards.toMutableList().also {
it.add(HomeCardModel(config.profileId, HomeCard.CARD_NOTES))
}
}
dataVersion = 3