Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 966f58ae authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé
Browse files

refactor(core-preference): move FALLBACK_ACCOUNT_COLOR to AccountDefaultsProvider

parent c07d601d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -53,5 +53,8 @@ interface AccountDefaultsProvider {
        const val NO_OPENPGP_KEY: Long = 0

        const val UNASSIGNED_ACCOUNT_NUMBER = -1

        // TODO : Remove once storage is migrated to new format
        const val COLOR = 0x0099CC
    }
}
+2 −4
Original line number Diff line number Diff line
package net.thunderbird.feature.account.storage.legacy

import net.thunderbird.core.android.account.AccountDefaultsProvider
import net.thunderbird.core.android.account.LegacyAccount
import net.thunderbird.core.preference.storage.Storage
import net.thunderbird.core.preference.storage.StorageEditor
@@ -16,7 +17,7 @@ class LegacyProfileDtoStorageHandler(

        with(data) {
            name = storage.getStringOrNull(keyGen.create(KEY_NAME))
            chipColor = storage.getInt(keyGen.create(KEY_COLOR), FALLBACK_ACCOUNT_COLOR)
            chipColor = storage.getInt(keyGen.create(KEY_COLOR), AccountDefaultsProvider.COLOR)
        }

        avatarDtoStorageHandler.load(data, storage)
@@ -53,8 +54,5 @@ class LegacyProfileDtoStorageHandler(
    private companion object Companion {
        const val KEY_COLOR = "chipColor"
        const val KEY_NAME = "description"

        // TODO why?
        const val FALLBACK_ACCOUNT_COLOR = 0x0099CC
    }
}