Add better application error handling for badges and token redemption.

This commit is contained in:
Alex Hart
2021-11-05 12:28:07 -03:00
committed by Greyson Parrelli
parent 2b6190bf34
commit b8dc541fc5
10 changed files with 160 additions and 45 deletions

View File

@@ -36,6 +36,10 @@ data class Badge(
val visible: Boolean,
) : Parcelable, Key {
fun setVisible(): Badge {
return copy(visible = true)
}
fun isExpired(): Boolean = expirationTimestamp < System.currentTimeMillis() && expirationTimestamp > 0
fun isBoost(): Boolean = id == BOOST_BADGE_ID