refactor
This commit is contained in:
parent
d57a0c85d8
commit
d036225bd2
@ -605,10 +605,6 @@ void wrongPasswordDialog(String id, BuildContext context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showOptions(BuildContext context) {
|
void showOptions(BuildContext context) {
|
||||||
var showRemoteCursor =
|
|
||||||
FFI.getByName('toggle_option', 'show-remote-cursor') == 'true';
|
|
||||||
var lockAfterSessionEnd =
|
|
||||||
FFI.getByName('toggle_option', 'lock-after-session-end') == 'true';
|
|
||||||
String quality = FFI.getByName('image_quality');
|
String quality = FFI.getByName('image_quality');
|
||||||
if (quality == '') quality = 'balanced';
|
if (quality == '') quality = 'balanced';
|
||||||
var displays = <Widget>[];
|
var displays = <Widget>[];
|
||||||
@ -649,7 +645,6 @@ void showOptions(BuildContext context) {
|
|||||||
value: FFI.getByName('toggle_option', 'disable-audio') == 'true',
|
value: FFI.getByName('toggle_option', 'disable-audio') == 'true',
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
lockAfterSessionEnd = v;
|
|
||||||
FFI.setByName('toggle_option', 'disable-audio');
|
FFI.setByName('toggle_option', 'disable-audio');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -699,19 +694,21 @@ void showOptions(BuildContext context) {
|
|||||||
),
|
),
|
||||||
Divider(color: MyTheme.border),
|
Divider(color: MyTheme.border),
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
value: showRemoteCursor,
|
value: FFI.getByName(
|
||||||
|
'toggle_option', 'show-remote-cursor') ==
|
||||||
|
'true',
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
showRemoteCursor = v;
|
|
||||||
FFI.setByName('toggle_option', 'show-remote-cursor');
|
FFI.setByName('toggle_option', 'show-remote-cursor');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
title: Text('Show remote cursor')),
|
title: Text('Show remote cursor')),
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
value: lockAfterSessionEnd,
|
value: FFI.getByName(
|
||||||
|
'toggle_option', 'lock-after-session-end') ==
|
||||||
|
'true',
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
setState(() {
|
setState(() {
|
||||||
lockAfterSessionEnd = v;
|
|
||||||
FFI.setByName(
|
FFI.setByName(
|
||||||
'toggle_option', 'lock-after-session-end');
|
'toggle_option', 'lock-after-session-end');
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user