Add and sync displayBadgesOnProfile Flag.

This commit is contained in:
Alex Hart
2021-11-11 14:59:30 -04:00
parent b9f060b442
commit 6b94fc82eb
15 changed files with 78 additions and 20 deletions

View File

@@ -29,6 +29,7 @@ internal class DonationsValues internal constructor(store: KeyValueStore) : Sign
private const val USER_MANUALLY_CANCELLED = "donation.user.manually.cancelled"
private const val KEY_LEVEL_OPERATION_PREFIX = "donation.level.operation."
private const val KEY_LEVEL_HISTORY = "donation.level.history"
private const val DISPLAY_BADGES_ON_PROFILE = "donation.display.badges.on.profile"
}
override fun onFirstEverAppLaunch() = Unit
@@ -188,4 +189,12 @@ internal class DonationsValues internal constructor(store: KeyValueStore) : Sign
fun clearUserManuallyCancelled() {
remove(USER_MANUALLY_CANCELLED)
}
fun setDisplayBadgesOnProfile(enabled: Boolean) {
putBoolean(DISPLAY_BADGES_ON_PROFILE, enabled)
}
fun getDisplayBadgesOnProfile(): Boolean {
return getBoolean(DISPLAY_BADGES_ON_PROFILE, false)
}
}