1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-04 10:39:25 +00:00

Cancel orphan toasts

This commit is contained in:
M66B 2022-05-29 13:57:54 +02:00
parent bfaad8333e
commit fd1013b6ad
5 changed files with 28 additions and 7 deletions

View file

@ -679,8 +679,11 @@ public class ActivityEML extends ActivityBase {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, @NonNull Throwable ex) {

View file

@ -791,8 +791,11 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {

View file

@ -413,8 +413,11 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {

View file

@ -2397,8 +2397,11 @@ public class FragmentCompose extends FragmentBase {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {
@ -2474,8 +2477,11 @@ public class FragmentCompose extends FragmentBase {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {

View file

@ -498,8 +498,11 @@ public class FragmentContacts extends FragmentBase {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {
@ -597,8 +600,11 @@ public class FragmentContacts extends FragmentBase {
@Override
protected void onDestroyed(Bundle args) {
if (toast != null) {
toast.cancel();
toast = null;
}
}
@Override
protected void onException(Bundle args, Throwable ex) {