1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Keep local keywords

This commit is contained in:
M66B 2020-09-17 17:42:08 +02:00
parent 1eaac0d4e4
commit c0f2e069e0

View file

@ -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 +