mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Fix memory leaks in payments home and confirm payment view models.
This commit is contained in:
@@ -101,6 +101,12 @@ final class ConfirmPaymentViewModel extends ViewModel {
|
||||
confirmPaymentRepository.confirmPayment(store.getState(), this::handleConfirmPaymentResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCleared() {
|
||||
super.onCleared();
|
||||
store.clear();
|
||||
}
|
||||
|
||||
void refreshFee() {
|
||||
feeRetry.setValue(true);
|
||||
}
|
||||
|
||||
@@ -88,6 +88,12 @@ public class PaymentsHomeViewModel extends ViewModel {
|
||||
refreshExchangeRates(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCleared() {
|
||||
super.onCleared();
|
||||
store.clear();
|
||||
}
|
||||
|
||||
private static PaymentsHomeState.PaymentsState getPaymentsState() {
|
||||
PaymentsValues paymentsValues = SignalStore.paymentsValues();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user