This commit is contained in:
open-trade 2020-11-28 13:34:59 +08:00
parent 6a5454f72a
commit d57a0c85d8

View File

@ -642,9 +642,20 @@ void showOptions(BuildContext context) {
)));
displays.add(Divider(color: MyTheme.border));
}
showAlertDialog(
context,
(setState) => Tuple3(
showAlertDialog(context, (setState) {
final more = [];
if (FFI.ffiModel.permissions['audio'] != false) {
more.add(CheckboxListTile(
value: FFI.getByName('toggle_option', 'disable-audio') == 'true',
onChanged: (v) {
setState(() {
lockAfterSessionEnd = v;
FFI.setByName('toggle_option', 'disable-audio');
});
},
title: Text('Mute')));
}
return Tuple3(
null,
Column(
mainAxisSize: MainAxisSize.min,
@ -692,8 +703,7 @@ void showOptions(BuildContext context) {
onChanged: (v) {
setState(() {
showRemoteCursor = v;
FFI.setByName(
'toggle_option', 'show-remote-cursor');
FFI.setByName('toggle_option', 'show-remote-cursor');
});
},
title: Text('Show remote cursor')),
@ -707,18 +717,17 @@ void showOptions(BuildContext context) {
});
},
title: Text('Lock after session end'))
]),
null),
() async => true,
true,
0);
] +
more),
null);
}, () async => true, true, 0);
}
void showActions(BuildContext context) {
final size = MediaQuery.of(context).size;
final x = 120.0;
final y = size.height;
var more = <Widget>[];
final more = <Widget>[];
if (FFI.ffiModel.pi.version.isNotEmpty) {
more.add(PopupMenuItem<String>(child: Text('Refresh'), value: 'refresh'));
}