fix(notifications): sync mute state in chat store immediately
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
@@ -34,6 +34,7 @@ interface Props {
|
||||
export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
const me = useAuthStore((s) => s.me);
|
||||
const loadChats = useChatStore((s) => s.loadChats);
|
||||
const updateChatMuted = useChatStore((s) => s.updateChatMuted);
|
||||
const setActiveChatId = useChatStore((s) => s.setActiveChatId);
|
||||
const setFocusedMessage = useChatStore((s) => s.setFocusedMessage);
|
||||
const showToast = useUiStore((s) => s.showToast);
|
||||
@@ -306,6 +307,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
try {
|
||||
const updated = await updateChatNotificationSettings(chatId, !muted);
|
||||
setMuted(updated.muted);
|
||||
updateChatMuted(chatId, updated.muted);
|
||||
} catch {
|
||||
setError("Failed to update notifications");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user