mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-18 21:28:54 +00:00
Simplification
This commit is contained in:
parent
54162c0d5d
commit
22b79d0e3b
1 changed files with 4 additions and 7 deletions
|
@ -662,13 +662,10 @@ class Core {
|
|||
message = db.message().getMessage(message.id);
|
||||
|
||||
List<String> keywords = new ArrayList<>(Arrays.asList(message.keywords));
|
||||
if (set) {
|
||||
if (!keywords.contains(keyword))
|
||||
keywords.add(keyword);
|
||||
} else {
|
||||
while (keywords.remove(keyword))
|
||||
;
|
||||
}
|
||||
while (keywords.remove(keyword))
|
||||
;
|
||||
if (set)
|
||||
keywords.add(keyword);
|
||||
|
||||
db.message().setMessageKeywords(message.id, DB.Converters.fromStringArray(keywords.toArray(new String[0])));
|
||||
|
||||
|
|
Loading…
Reference in a new issue