mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Add new styling for active subscription pref item.
This commit is contained in:
committed by
Cody Henthorne
parent
5150564fe2
commit
b14209d5cf
@@ -131,6 +131,7 @@ class ManageDonationsFragment :
|
||||
|
||||
if (state.transactionState is ManageDonationsState.TransactionState.NotInTransaction) {
|
||||
val activeSubscription = state.transactionState.activeSubscription.activeSubscription
|
||||
|
||||
if (activeSubscription != null) {
|
||||
val subscription: Subscription? = state.availableSubscriptions.firstOrNull { it.level == activeSubscription.level }
|
||||
if (subscription != null) {
|
||||
|
||||
@@ -55,7 +55,7 @@ class ContactSearchViewModel(
|
||||
val selectionState: LiveData<Set<ContactSearchKey>> = selectionStore.stateLiveData
|
||||
val errorEventsStream: Observable<ContactSearchError> = errorEvents
|
||||
|
||||
private var selectionSize = 0;
|
||||
private var selectionSize = 0
|
||||
override fun onCleared() {
|
||||
disposables.clear()
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class ContactSearchViewModel(
|
||||
|
||||
val newSelectionEntries = results.filter { it.isSelectable }.map { it.key } - getSelectedContacts()
|
||||
val newSelectionSize = newSelectionEntries.size + getSelectedContacts().size
|
||||
selectionSize = newSelectionSize
|
||||
selectionSize = newSelectionSize
|
||||
if (selectionLimits.hasRecommendedLimit() && getSelectedContacts().size < selectionLimits.recommendedLimit && newSelectionSize >= selectionLimits.recommendedLimit) {
|
||||
errorEvents.onNext(ContactSearchError.RECOMMENDED_LIMIT_REACHED)
|
||||
} else if (selectionLimits.hasHardLimit() && newSelectionSize > selectionLimits.hardLimit) {
|
||||
@@ -111,8 +111,8 @@ class ContactSearchViewModel(
|
||||
}
|
||||
|
||||
fun setKeysNotSelected(contactSearchKeys: Set<ContactSearchKey>) {
|
||||
val newSelectionSize = getSelectedContacts().size - contactSearchKeys.size
|
||||
selectionSize = newSelectionSize
|
||||
val newSelectionSize = getSelectedContacts().size - contactSearchKeys.size
|
||||
selectionSize = newSelectionSize
|
||||
selectionStore.update { it - contactSearchKeys }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user