mirror of https://github.com/M66B/FairEmail.git
View model on clear
This commit is contained in:
parent
d31177c78e
commit
91ea751d59
|
@ -50,6 +50,14 @@ public class ViewModelBrowse extends ViewModel {
|
|||
this.loaded = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCleared() {
|
||||
context = null;
|
||||
istore = null;
|
||||
ifolder = null;
|
||||
imessages = null;
|
||||
}
|
||||
|
||||
Context getContext() {
|
||||
return context;
|
||||
}
|
||||
|
@ -158,6 +166,7 @@ public class ViewModelBrowse extends ViewModel {
|
|||
} catch (Throwable ex) {
|
||||
Log.e(Helper.TAG, "Boundary " + ex + "\n" + Log.getStackTraceString(ex));
|
||||
} finally {
|
||||
context = null;
|
||||
istore = null;
|
||||
ifolder = null;
|
||||
imessages = null;
|
||||
|
|
|
@ -10,6 +10,11 @@ public class ViewModelMessages extends ViewModel {
|
|||
this.messages = messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCleared() {
|
||||
messages = null;
|
||||
}
|
||||
|
||||
Target[] getPrevNext(String thread) {
|
||||
if (messages == null)
|
||||
return new Target[]{null, null};
|
||||
|
|
Loading…
Reference in New Issue