mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 18:20:28 +03:00
Fix unread reset and notification settings (#1824)
* reset unread with client sync state change * fix notification toggle setting not working * revert formatOnSave vscode setting
This commit is contained in:
parent
e2228a18c1
commit
e6d6b0349e
9 changed files with 62 additions and 100 deletions
|
|
@ -185,8 +185,11 @@ export const useBindRoomToUnreadAtom = (
|
|||
useSyncState(
|
||||
mx,
|
||||
useCallback(
|
||||
(state) => {
|
||||
if (state === SyncState.Prepared) {
|
||||
(state, prevState) => {
|
||||
if (
|
||||
(state === SyncState.Prepared && prevState === null) ||
|
||||
(state === SyncState.Syncing && prevState !== SyncState.Syncing)
|
||||
) {
|
||||
setUnreadAtom({
|
||||
type: 'RESET',
|
||||
unreadInfos: getUnreadInfos(mx),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue