fix(android): close the thread pane on back press

This commit is contained in:
Erwan Leboucher committed 2026-08-23 01:07:44 +02:00
1 parent 440d19b503
commit 4883cb2b1f
2 files changed
+4

No files matched your search

+2
View File
@@ -20,6 +20,7 @@ import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge';
import * as css from './ThreadDrawer.css';
import { SidebarResizer } from '$pages/client/sidebar/SidebarResizer';
import { isMobileOrTablet } from '$utils/platform';
import { useDismissOnBack } from '$utils/androidBack';
import { useMatrixEvent } from '$hooks/useMatrixEvent';
type ThreadPreviewProps = {
@@ -154,6 +155,7 @@ export function ThreadBrowser({ room, onOpenThread, onClose, overlay }: ThreadBr
const loadingMoreRef = useRef(false);
const canLoadMoreRef = useRef(false);
canLoadMoreRef.current = canLoadMore;
useDismissOnBack(onClose);
// On mount, set up thread event listeners, create the server-side thread
// timeline sets, then fetch page 1 via paginate. The two operations are
+2
View File
@@ -46,6 +46,7 @@ import { RoomViewFollowing, RoomViewFollowingPlaceholder } from './RoomViewFollo
import * as css from './ThreadDrawer.css';
import { SidebarResizer } from '$pages/client/sidebar/SidebarResizer';
import { isMobileOrTablet } from '$utils/platform';
import { useDismissOnBack } from '$utils/androidBack';
import type { Persona } from '$app/persona';
type ThreadDrawerProps = {
@@ -77,6 +78,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra
[jotaiStore]
);
const pushProcessor = mx.pushProcessor;
useDismissOnBack(onClose);
const isInactivePanel = useIsInactivePanel();
// Shared renderer context — replaces 17+ inline useSetting calls,