mirror of https://github.com/M66B/FairEmail.git
Save classifier model on quit
This commit is contained in:
parent
a25c46fc85
commit
9c3fd46905
|
@ -515,6 +515,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
List<EntityOperation> ops = db.operation().getOperations(EntityOperation.SYNC);
|
List<EntityOperation> ops = db.operation().getOperations(EntityOperation.SYNC);
|
||||||
for (EntityOperation op : ops)
|
for (EntityOperation op : ops)
|
||||||
db.folder().setFolderSyncState(op.folder, null);
|
db.folder().setFolderSyncState(op.folder, null);
|
||||||
|
|
||||||
|
MessageClassifier.save(ServiceSynchronize.this);
|
||||||
} else {
|
} else {
|
||||||
// Yield update notifications/widgets
|
// Yield update notifications/widgets
|
||||||
try {
|
try {
|
||||||
|
@ -735,17 +737,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
|
|
||||||
liveAccountNetworkState.postDestroy();
|
liveAccountNetworkState.postDestroy();
|
||||||
|
|
||||||
executor.submit(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
MessageClassifier.save(ServiceSynchronize.this);
|
|
||||||
} catch (Throwable ex) {
|
|
||||||
Log.e(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
TTSHelper.shutdown();
|
TTSHelper.shutdown();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue