fix(notifications): sync mute state in chat store immediately
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-03-08 20:40:44 +03:00
parent 418c9e6044
commit 20f31cd15e
3 changed files with 8 additions and 1 deletions

View File

@@ -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 {