open sidebar on homepage pop

This commit is contained in:
Henry Hiles 2026-10-16 17:17:19 -04:00
commit a3a3781252
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -39,38 +39,44 @@ class const ChatPage({super.key}) extends HookConsumerWidget {
final showMembersByDefault = constraints.maxWidth > 1000;
final roomId = ref.watch(SelectedRoomController.provider);
return SafeArea(
child: Scaffold(
key: scaffoldKey,
appBar: initComplete ? null : Appbar(),
body: initComplete
? Row(
children: [
if (isDesktop) Sidebar(),
Expanded(
child: RoomChat(
key: ValueKey(roomId),
roomId: roomId,
isDesktop: isDesktop,
showMembersByDefault: showMembersByDefault,
),
),
],
)
: Column(
children: [
const SyncStatusBanner(),
Expanded(
child: Center(
child: Column(
mainAxisSize: .min,
children: [Loading(), Text("Syncing...")],
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
if (!didPop) scaffoldKey.currentState?.openDrawer();
},
child: SafeArea(
child: Scaffold(
key: scaffoldKey,
appBar: initComplete ? null : Appbar(),
body: initComplete
? Row(
children: [
if (isDesktop) Sidebar(),
Expanded(
child: RoomChat(
key: ValueKey(roomId),
roomId: roomId,
isDesktop: isDesktop,
showMembersByDefault: showMembersByDefault,
),
),
),
],
),
drawer: isDesktop || !initComplete ? null : Sidebar(),
],
)
: Column(
children: [
const SyncStatusBanner(),
Expanded(
child: Center(
child: Column(
mainAxisSize: .min,
children: [Loading(), Text("Syncing...")],
),
),
),
],
),
drawer: isDesktop || !initComplete ? null : Sidebar(),
),
),
);
},