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:
parent
38ee55b2ec
commit
5a9ac630be
1 changed files with 16 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue