mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Keep local keywords
This commit is contained in:
parent
1eaac0d4e4
commit
c0f2e069e0
1 changed files with 5 additions and 6 deletions
|
@ -701,14 +701,12 @@ class Core {
|
|||
if (TextUtils.isEmpty(keyword))
|
||||
throw new IllegalArgumentException("keyword/empty");
|
||||
|
||||
if (!ifolder.getPermanentFlags().contains(Flags.Flag.USER)) {
|
||||
db.message().setMessageKeywords(message.id, DB.Converters.fromStringArray(null));
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.uid == null)
|
||||
throw new IllegalArgumentException("keyword/uid");
|
||||
|
||||
if (!ifolder.getPermanentFlags().contains(Flags.Flag.USER))
|
||||
return;
|
||||
|
||||
Message imessage = ifolder.getMessageByUID(message.uid);
|
||||
if (imessage == null)
|
||||
throw new MessageRemovedException();
|
||||
|
@ -2916,7 +2914,8 @@ class Core {
|
|||
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " flags=" + flags);
|
||||
}
|
||||
|
||||
if (!Helper.equal(message.keywords, keywords)) {
|
||||
if (!Helper.equal(message.keywords, keywords) &&
|
||||
ifolder.getPermanentFlags().contains(Flags.Flag.USER)) {
|
||||
update = true;
|
||||
message.keywords = keywords;
|
||||
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid +
|
||||
|
|
Loading…
Reference in a new issue