mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
feat(mobx): migrate unreads to revolt.js
This commit is contained in:
@@ -195,12 +195,17 @@ export default class NotificationOptions implements Store, Persistent<Data> {
|
||||
* @returns Whether this object is muted
|
||||
*/
|
||||
isMuted(target?: Channel | Server) {
|
||||
var value: NotificationState | undefined;
|
||||
if (target instanceof Channel) {
|
||||
return this.computeForChannel(target) === "muted";
|
||||
value = this.computeForChannel(target);
|
||||
} else if (target instanceof Server) {
|
||||
return this.computeForServer(target._id) === "muted";
|
||||
} else {
|
||||
return false;
|
||||
value = this.computeForServer(target._id);
|
||||
}
|
||||
|
||||
if (value === "muted") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ export default class ServerConfig
|
||||
*/
|
||||
createClient() {
|
||||
const client = new Client({
|
||||
unreads: true,
|
||||
autoReconnect: false,
|
||||
apiURL: import.meta.env.VITE_API_URL,
|
||||
debug: import.meta.env.DEV,
|
||||
|
||||
Reference in New Issue
Block a user