mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 01:21:18 -08:00
fix(android): close the thread pane on back press
This commit is contained in:
2 files changed
+4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user