Detect highlights
This commit is contained in:
parent
ed6dccbb58
commit
abece1e3fd
4 changed files with 55 additions and 1 deletions
2
state.js
2
state.js
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue