Remove unread message dot when messages all read
Clicking the Mark All Read button was clearing the messages, but the purple dot was not disappearing until the page was refreshed. It appears it was just because the calculation was being cached and not updated because the dm interaction counter was not inputted as a dependency to useMemo
This commit is contained in:
parent
d74af4b323
commit
c0d9399ca7
@ -29,8 +29,17 @@ export default function Layout() {
|
||||
const [show, setShow] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
const navigate = useNavigate();
|
||||
const { loggedOut, publicKey, relays, latestNotification, readNotifications, dms, preferences, newUserKey } =
|
||||
useSelector((s: RootState) => s.login);
|
||||
const {
|
||||
loggedOut,
|
||||
publicKey,
|
||||
relays,
|
||||
latestNotification,
|
||||
readNotifications,
|
||||
dms,
|
||||
preferences,
|
||||
newUserKey,
|
||||
dmInteraction,
|
||||
} = useSelector((s: RootState) => s.login);
|
||||
const { isMuted } = useModeration();
|
||||
const [pageClass, setPageClass] = useState("page");
|
||||
const pub = useEventPublisher();
|
||||
@ -66,7 +75,7 @@ export default function Layout() {
|
||||
publicKey
|
||||
)
|
||||
: 0,
|
||||
[dms, publicKey]
|
||||
[dms, publicKey, dmInteraction]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user