chore: Follow up pop space view
This commit is contained in:
parent
956a2e6523
commit
754870e3fd
2 changed files with 275 additions and 275 deletions
|
|
@ -30,9 +30,14 @@ class ChatListView extends StatelessWidget {
|
||||||
final selectMode = controller.selectMode;
|
final selectMode = controller.selectMode;
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: controller.selectMode == SelectMode.normal &&
|
canPop: controller.selectMode == SelectMode.normal &&
|
||||||
!controller.isSearchMode,
|
!controller.isSearchMode &&
|
||||||
|
controller.activeSpaceId == null,
|
||||||
onPopInvoked: (pop) {
|
onPopInvoked: (pop) {
|
||||||
if (pop) return;
|
if (pop) return;
|
||||||
|
if (controller.activeSpaceId != null) {
|
||||||
|
controller.clearActiveSpace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
final selMode = controller.selectMode;
|
final selMode = controller.selectMode;
|
||||||
if (controller.isSearchMode) {
|
if (controller.isSearchMode) {
|
||||||
controller.cancelSearch();
|
controller.cancelSearch();
|
||||||
|
|
|
||||||
|
|
@ -165,10 +165,7 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
final room = Matrix.of(context).client.getRoomById(widget.spaceId);
|
final room = Matrix.of(context).client.getRoomById(widget.spaceId);
|
||||||
final displayname =
|
final displayname =
|
||||||
room?.getLocalizedDisplayname() ?? L10n.of(context)!.nothingFound;
|
room?.getLocalizedDisplayname() ?? L10n.of(context)!.nothingFound;
|
||||||
return PopScope(
|
return Scaffold(
|
||||||
canPop: false,
|
|
||||||
onPopInvoked: (_) => widget.onBack(),
|
|
||||||
child: Scaffold(
|
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: Center(
|
leading: Center(
|
||||||
child: CloseButton(
|
child: CloseButton(
|
||||||
|
|
@ -283,9 +280,8 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
onChanged: (_) => setState(() {}),
|
onChanged: (_) => setState(() {}),
|
||||||
textInputAction: TextInputAction.search,
|
textInputAction: TextInputAction.search,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Theme.of(context)
|
fillColor:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.secondaryContainer,
|
||||||
.secondaryContainer,
|
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
borderRadius: BorderRadius.circular(99),
|
borderRadius: BorderRadius.circular(99),
|
||||||
|
|
@ -473,7 +469,6 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue