Merge branch 'android-back-button-cancels-share' into 'main'
android: back button cancels share (still pops) See merge request famedly/fluffychat!421
This commit is contained in:
commit
249e97bcbc
2 changed files with 10 additions and 14 deletions
|
|
@ -20,17 +20,12 @@ class ChatListView extends StatelessWidget {
|
|||
return StreamBuilder<Object>(
|
||||
stream: Matrix.of(context).onShareContentChanged.stream,
|
||||
builder: (_, __) {
|
||||
final selectMode = Matrix.of(context).shareContent != null
|
||||
? SelectMode.share
|
||||
: controller.selectedRoomIds.isEmpty
|
||||
? SelectMode.normal
|
||||
: SelectMode.select;
|
||||
final selectMode = controller.selectMode;
|
||||
return VWidgetGuard(
|
||||
onSystemPop: (redirector) async {
|
||||
if (controller.selectedRoomIds.isNotEmpty) {
|
||||
controller.cancelAction();
|
||||
redirector.stopRedirection();
|
||||
}
|
||||
final selMode = controller.selectMode;
|
||||
if (selMode != SelectMode.normal) controller.cancelAction();
|
||||
if (selMode == SelectMode.select) redirector.stopRedirection();
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue