Simplification

pull/172/head
M66B 5 years ago
parent 54162c0d5d
commit 22b79d0e3b

@ -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…
Cancel
Save