kopia lustrzana https://github.com/ryukoposting/Signal-Android
Mark unexpected cancellation when silenced so we do not keep hammering the logs.
rodzic
b8e16353ab
commit
f6f1fdb87d
|
@ -58,7 +58,7 @@ class DonorErrorConfigurationFragment : DSLSettingsFragment() {
|
||||||
secondaryButtonNoOutline(
|
secondaryButtonNoOutline(
|
||||||
text = DSLSettingsText.from(R.string.preferences__internal_donor_error_clear),
|
text = DSLSettingsText.from(R.string.preferences__internal_donor_error_clear),
|
||||||
onClick = {
|
onClick = {
|
||||||
lifecycleDisposable += viewModel.clear().subscribe()
|
lifecycleDisposable += viewModel.clearErrorState().subscribe()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,10 +108,10 @@ class DonorErrorConfigurationViewModel : ViewModel() {
|
||||||
}
|
}
|
||||||
}.subscribeOn(Schedulers.io())
|
}.subscribeOn(Schedulers.io())
|
||||||
|
|
||||||
return clear().andThen(saveState)
|
return clearErrorState().andThen(saveState)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clear(): Completable {
|
fun clearErrorState(): Completable {
|
||||||
return Completable.fromAction {
|
return Completable.fromAction {
|
||||||
synchronized(SubscriptionReceiptRequestResponseJob.MUTEX) {
|
synchronized(SubscriptionReceiptRequestResponseJob.MUTEX) {
|
||||||
SignalStore.donationsValues().setExpiredBadge(null)
|
SignalStore.donationsValues().setExpiredBadge(null)
|
||||||
|
|
|
@ -408,8 +408,10 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
isDisplayingSubscriptionFailure = true;
|
isDisplayingSubscriptionFailure = true;
|
||||||
} else if (unexpectedSubscriptionCancellation != null && SignalStore.donationsValues().isUserManuallyCancelled()) {
|
} else if (unexpectedSubscriptionCancellation != null && SignalStore.donationsValues().isUserManuallyCancelled()) {
|
||||||
Log.w(TAG, "Unexpected cancellation detected but not displaying dialog because user manually cancelled their subscription: " + unexpectedSubscriptionCancellation, true);
|
Log.w(TAG, "Unexpected cancellation detected but not displaying dialog because user manually cancelled their subscription: " + unexpectedSubscriptionCancellation, true);
|
||||||
|
SignalStore.donationsValues().setUnexpectedSubscriptionCancelationWatermark(subscriptionFailureTimestamp);
|
||||||
} else if (unexpectedSubscriptionCancellation != null && !SignalStore.donationsValues().showCantProcessDialog()) {
|
} else if (unexpectedSubscriptionCancellation != null && !SignalStore.donationsValues().showCantProcessDialog()) {
|
||||||
Log.w(TAG, "Unexpected cancellation detected but not displaying dialog because user has silenced it.", true);
|
Log.w(TAG, "Unexpected cancellation detected but not displaying dialog because user has silenced it.", true);
|
||||||
|
SignalStore.donationsValues().setUnexpectedSubscriptionCancelationWatermark(subscriptionFailureTimestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expiredBadge != null && !isDisplayingSubscriptionFailure) {
|
if (expiredBadge != null && !isDisplayingSubscriptionFailure) {
|
||||||
|
|
Ładowanie…
Reference in New Issue