diff --git a/.changeset/fix-edit-button.md b/.changeset/fix-edit-button.md new file mode 100644 index 000000000..99ebc6fb7 --- /dev/null +++ b/.changeset/fix-edit-button.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix edit button not always editing. diff --git a/.changeset/fix-search.md b/.changeset/fix-search.md new file mode 100644 index 000000000..3e23d0afd --- /dev/null +++ b/.changeset/fix-search.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix search/nav/links/etc not loading messages. diff --git a/.changeset/fix-timeline-scroll.md b/.changeset/fix-timeline-scroll.md new file mode 100644 index 000000000..ea6ad4c5b --- /dev/null +++ b/.changeset/fix-timeline-scroll.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix timeline not sticking to the bottom in non-reduced motion setting. diff --git a/.changeset/replace-morg.md b/.changeset/replace-morg.md new file mode 100644 index 000000000..232670fda --- /dev/null +++ b/.changeset/replace-morg.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Replace matrix.org with matrixrooms.info in default featured servers section. diff --git a/config.json b/config.json index 24d3e65e5..c4c8e870c 100644 --- a/config.json +++ b/config.json @@ -35,7 +35,7 @@ "#PrivSec.dev:arcticfoxes.net", "#disroot:aria-net.org" ], - "servers": ["matrix.org", "mozilla.org", "unredacted.org"] + "servers": ["matrixrooms.info", "mozilla.org", "unredacted.org"] }, "hashRouter": { diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx index 87df29384..7b2badc4b 100644 --- a/src/app/features/room/RoomTimeline.tsx +++ b/src/app/features/room/RoomTimeline.tsx @@ -214,20 +214,12 @@ export function RoomTimeline({ const processedEventsRef = useRef([]); const timelineSyncRef = useRef(null as unknown as typeof timelineSync); - const scrollToBottom = useCallback( - (behavior?: 'instant' | 'smooth') => { - if (!vListRef.current) return; - const lastIndex = processedEventsRef.current.length - 1; - if (lastIndex < 0) return; - - if (behavior === 'smooth' && !reducedMotion) { - vListRef.current.scrollToIndex(lastIndex, { align: 'end', smooth: true }); - } else { - vListRef.current.scrollTo(vListRef.current.scrollSize); - } - }, - [reducedMotion] - ); + const scrollToBottom = useCallback(() => { + if (!vListRef.current) return; + const lastIndex = processedEventsRef.current.length - 1; + if (lastIndex < 0) return; + vListRef.current.scrollTo(vListRef.current.scrollSize); + }, []); const timelineSync = useTimelineSync({ room, @@ -342,6 +334,18 @@ export function RoomTimeline({ }; }, [timelineSync.focusItem, timelineSync, reducedMotion, getRawIndexToProcessedIndex]); + useEffect(() => { + if (timelineSync.focusItem) { + setIsReady(true); + } + }, [timelineSync.focusItem]); + + useEffect(() => { + if (!eventId) return; + setIsReady(false); + timelineSyncRef.current.loadEventTimeline(eventId); + }, [eventId, room.roomId]); + useEffect(() => { if (eventId) return; const { readUptoEventId, inLiveTimeline, scrollTo } = unreadInfo ?? {}; @@ -636,7 +640,8 @@ export function RoomTimeline({ : timelineSync.eventsLength; const vListIndices = useMemo( () => Array.from({ length: vListItemCount }, (_, i) => i), - [vListItemCount] + // eslint-disable-next-line react-hooks/exhaustive-deps + [vListItemCount, timelineSync.timeline] ); const processedEvents = useProcessedTimeline({ @@ -857,7 +862,7 @@ export function RoomTimeline({ onClick={() => { if (eventId) navigateRoom(room.roomId, undefined, { replace: true }); timelineSync.setTimeline(getInitialTimeline(room)); - scrollToBottom('instant'); + scrollToBottom(); }} > Jump to Latest