mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add more polish to Badges.
* Better network error handling * Marking user cancellations so we don't annoy them * Manage Profile screen treatment.
This commit is contained in:
committed by
Greyson Parrelli
parent
17517cfc88
commit
1af15842cc
@@ -29,6 +29,7 @@ internal class DonationsValues internal constructor(store: KeyValueStore) : Sign
|
||||
private const val KEY_LAST_KEEP_ALIVE_LAUNCH = "donation.last.successful.ping"
|
||||
private const val KEY_LAST_END_OF_PERIOD = "donation.last.end.of.period"
|
||||
private const val EXPIRED_BADGE = "donation.expired.badge"
|
||||
private const val USER_MANUALLY_CANCELLED = "donation.user.manually.cancelled"
|
||||
}
|
||||
|
||||
override fun onFirstEverAppLaunch() = Unit
|
||||
@@ -188,6 +189,18 @@ internal class DonationsValues internal constructor(store: KeyValueStore) : Sign
|
||||
putLong(KEY_LAST_END_OF_PERIOD, timestamp)
|
||||
}
|
||||
|
||||
fun isUserManuallyCancelled(): Boolean {
|
||||
return getBoolean(USER_MANUALLY_CANCELLED, false)
|
||||
}
|
||||
|
||||
fun markUserManuallyCancelled() {
|
||||
putBoolean(USER_MANUALLY_CANCELLED, true)
|
||||
}
|
||||
|
||||
fun clearUserManuallyCancelled() {
|
||||
remove(USER_MANUALLY_CANCELLED)
|
||||
}
|
||||
|
||||
private fun dispatchLevelOperation() {
|
||||
levelUpdateOperationPublisher.onNext(Optional.fromNullable(getLevelOperation()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user