Turn off the accepted rules and fix the design tokens, alt text, and last type errors. [skip build]
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
MatrixClient,
|
||||
RoomEvent,
|
||||
ClientEvent,
|
||||
EventType,
|
||||
MatrixEvent,
|
||||
Room,
|
||||
IPushRules,
|
||||
@@ -24,7 +25,6 @@ import { roomToParentsAtom } from '../../state/room/roomToParents';
|
||||
import { mDirectAtom } from '../../state/mDirectList';
|
||||
import { getDirectRoomPath, getHomeRoomPath, getSpaceRoomPath } from '../../pages/pathUtils';
|
||||
import { RoomNotificationMode } from '../../hooks/useRoomsNotificationPreferences';
|
||||
import { AccountDataEvent } from '../../../types/matrix/accountData';
|
||||
import { getNotificationMode, NotificationMode } from '../../hooks/useNotificationMode';
|
||||
import { useSyncState } from '../../hooks/useSyncState';
|
||||
import { useBackRoute } from '../../hooks/useBackRoute';
|
||||
@@ -107,10 +107,10 @@ export function TitleBar({ mx, children }: TitleBarProps) {
|
||||
}
|
||||
|
||||
// We can't use hooks here, so we'll fetch the data directly
|
||||
const userId = mx.getUserId();
|
||||
const userId = mx.getUserId() ?? undefined;
|
||||
|
||||
// Get push rules for keywords
|
||||
const pushRulesEvt = mx.getAccountData(AccountDataEvent.PushRules);
|
||||
const pushRulesEvt = mx.getAccountData(EventType.PushRules);
|
||||
const pushRules = pushRulesEvt?.getContent<IPushRules>() ?? { global: {} };
|
||||
const content = pushRules.global.content ?? [];
|
||||
const keywordPatterns = content
|
||||
@@ -600,7 +600,6 @@ export function TitleBar({ mx, children }: TitleBarProps) {
|
||||
const path = [...parentChain, roomName];
|
||||
|
||||
return path.join(' > ');
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [mx, roomId, roomToParents, mDirects, updateCounter]);
|
||||
|
||||
// Get total unread count
|
||||
@@ -608,7 +607,6 @@ export function TitleBar({ mx, children }: TitleBarProps) {
|
||||
if (!mx) return 0;
|
||||
const unreadInfos = getUnreadInfos(mx);
|
||||
return unreadInfos.reduce((sum, info) => sum + info.total, 0);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [mx, updateCounter]);
|
||||
|
||||
// Build title parts
|
||||
|
||||
Reference in New Issue
Block a user