open sidebar on homepage pop
This commit is contained in:
parent
81851bdc42
commit
a3a3781252
1 changed files with 35 additions and 29 deletions
|
|
@ -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(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue