Files
discord-decomp/modules/conversations/ConversationVisibilityStore.tsx
T
2026-11-01 12:12:55 +02:00

35 lines
936 B
TypeScript

// Metro module 5859 (f5860).
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
let highlightingEnabled = true;
class ConversationVisibilityStore extends Module589.DeviceSettingsStore {
static displayName = "ConversationVisibilityStore";
static persistKey = "ConversationVisibilityStore";
initialize(a0) {
let r4 = a0?.highlightingEnabled;
if (r4 == null) {
r4 = true;
}
highlightingEnabled = r4;
}
isHighlightingEnabled() {
return highlightingEnabled;
}
getState() {
return {
highlightingEnabled
};
}
getUserAgnosticState() {
return {
highlightingEnabled
};
}
}
const conversationVisibilityStore = new ConversationVisibilityStore(Dispatcher, {
CONVERSATIONS_TOGGLE_HIGHLIGHTING: function handleToggleHighlighting() {
highlightingEnabled = !highlightingEnabled;
}
});
export default conversationVisibilityStore;