mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +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
@@ -51,9 +51,14 @@ class BadgesOverviewViewModel(
|
||||
} else {
|
||||
Optional.absent()
|
||||
}
|
||||
}.subscribeBy { badgeId ->
|
||||
store.update { it.copy(fadedBadgeId = badgeId.orNull()) }
|
||||
}
|
||||
}.subscribeBy(
|
||||
onSuccess = { badgeId ->
|
||||
store.update { it.copy(fadedBadgeId = badgeId.orNull()) }
|
||||
},
|
||||
onError = { throwable ->
|
||||
Log.w(TAG, "Could not retrieve data from server", throwable)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun setDisplayBadgesOnProfile(displayBadgesOnProfile: Boolean) {
|
||||
@@ -82,4 +87,8 @@ class BadgesOverviewViewModel(
|
||||
return requireNotNull(modelClass.cast(BadgesOverviewViewModel(badgeRepository, subscriptionsRepository)))
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = Log.tag(BadgesOverviewViewModel::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user