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