mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 10:17:56 +00:00
Mark unexpected cancellation when silenced so we do not keep hammering the logs.
This commit is contained in:
committed by
Cody Henthorne
parent
b8e16353ab
commit
f6f1fdb87d
@@ -58,7 +58,7 @@ class DonorErrorConfigurationFragment : DSLSettingsFragment() {
|
||||
secondaryButtonNoOutline(
|
||||
text = DSLSettingsText.from(R.string.preferences__internal_donor_error_clear),
|
||||
onClick = {
|
||||
lifecycleDisposable += viewModel.clear().subscribe()
|
||||
lifecycleDisposable += viewModel.clearErrorState().subscribe()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,10 +108,10 @@ class DonorErrorConfigurationViewModel : ViewModel() {
|
||||
}
|
||||
}.subscribeOn(Schedulers.io())
|
||||
|
||||
return clear().andThen(saveState)
|
||||
return clearErrorState().andThen(saveState)
|
||||
}
|
||||
|
||||
fun clear(): Completable {
|
||||
fun clearErrorState(): Completable {
|
||||
return Completable.fromAction {
|
||||
synchronized(SubscriptionReceiptRequestResponseJob.MUTEX) {
|
||||
SignalStore.donationsValues().setExpiredBadge(null)
|
||||
|
||||
@@ -408,8 +408,10 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||
isDisplayingSubscriptionFailure = true;
|
||||
} 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);
|
||||
SignalStore.donationsValues().setUnexpectedSubscriptionCancelationWatermark(subscriptionFailureTimestamp);
|
||||
} else if (unexpectedSubscriptionCancellation != null && !SignalStore.donationsValues().showCantProcessDialog()) {
|
||||
Log.w(TAG, "Unexpected cancellation detected but not displaying dialog because user has silenced it.", true);
|
||||
SignalStore.donationsValues().setUnexpectedSubscriptionCancelationWatermark(subscriptionFailureTimestamp);
|
||||
}
|
||||
|
||||
if (expiredBadge != null && !isDisplayingSubscriptionFailure) {
|
||||
|
||||
Reference in New Issue
Block a user