Simplification

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

@ -662,13 +662,10 @@ class Core {
message = db.message().getMessage(message.id); message = db.message().getMessage(message.id);
List<String> keywords = new ArrayList<>(Arrays.asList(message.keywords)); List<String> keywords = new ArrayList<>(Arrays.asList(message.keywords));
if (set) { while (keywords.remove(keyword))
if (!keywords.contains(keyword)) ;
keywords.add(keyword); if (set)
} else { keywords.add(keyword);
while (keywords.remove(keyword))
;
}
db.message().setMessageKeywords(message.id, DB.Converters.fromStringArray(keywords.toArray(new String[0]))); db.message().setMessageKeywords(message.id, DB.Converters.fromStringArray(keywords.toArray(new String[0])));

Loading…
Cancel
Save