Detect highlights

This commit is contained in:
Simon Ser 2020-06-29 11:08:47 +02:00
parent ed6dccbb58
commit abece1e3fd
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 55 additions and 1 deletions

View file

@ -13,11 +13,13 @@ export const Status = {
export const Unread = {
NONE: "",
MESSAGE: "message",
HIGHLIGHT: "highlight",
union: (a, b) => {
const priority = {
[Unread.None]: 0,
[Unread.MESSAGE]: 1,
[Unread.HIGHLIGHT]: 2,
};
return (priority[a] > priority[b]) ? a : b;
},