[MM-66858] Fix email notification screen not updating (#9364)

This commit is contained in:
Daniel Espino García 2026-01-12 15:55:55 +01:00 committed by GitHub
parent 4a05ae0cfd
commit c3b141e77c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,12 @@ const Notifications = ({
}: NotificationsProps) => {
const intl = useIntl();
const serverUrl = useServerUrl();
const notifyProps = useMemo(() => getNotificationProps(currentUser), [currentUser]);
// We need to depend on the notifyProps object directly,
// since changes in it may not be reflected in the currentUser object
// (it is still the same object reference).
// eslint-disable-next-line react-hooks/exhaustive-deps
const notifyProps = useMemo(() => getNotificationProps(currentUser), [currentUser?.notifyProps]);
const callsRingingEnabled = useMemo(() => getCallsConfig(serverUrl).EnableRinging, [serverUrl]);
const [isRegistered, setIsRegistered] = useState(true);