Save classifier model only when loaded

This commit is contained in:
M66B 2021-01-02 22:39:30 +01:00
parent 34f1ae929b
commit bce800a855
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,8 @@ public class MessageClassifier {
} }
static synchronized void save(Context context) throws JSONException, IOException { static synchronized void save(Context context) throws JSONException, IOException {
if (!loaded)
return;
if (!isEnabled(context)) if (!isEnabled(context))
return; return;