Mark buffers as unread on new message
This commit is contained in:
parent
9ff1f164e0
commit
cbe76ab824
4 changed files with 64 additions and 23 deletions
20
state.js
Normal file
20
state.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
export const SERVER_BUFFER = "*";
|
||||
|
||||
export const Status = {
|
||||
DISCONNECTED: "disconnected",
|
||||
CONNECTING: "connecting",
|
||||
REGISTERED: "registered",
|
||||
};
|
||||
|
||||
export const Unread = {
|
||||
NONE: "",
|
||||
MESSAGE: "message",
|
||||
|
||||
union: (a, b) => {
|
||||
const priority = {
|
||||
[Unread.None]: 0,
|
||||
[Unread.MESSAGE]: 1,
|
||||
};
|
||||
return (priority[a] > priority[b]) ? a : b;
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue