1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Reset folder keywords on clear local messages

This commit is contained in:
M66B 2020-01-30 13:20:03 +01:00
parent 38ee55b2ec
commit 5a9ac630be

View file

@ -575,10 +575,22 @@ public class FragmentFolders extends FragmentBase {
Log.i("Delete local messages browsed=" + browsed);
DB db = DB.getInstance(context);
if (browsed)
db.message().deleteBrowsedMessages(fid);
else
db.message().deleteLocalMessages(fid);
try {
db.beginTransaction();
if (browsed)
db.message().deleteBrowsedMessages(fid);
else {
db.message().deleteLocalMessages(fid);
db.folder().setFolderKeywords(fid, DB.Converters.fromStringArray(null));
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
return null;
}