refact, separate remote window, debug

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-04 00:09:22 +08:00
parent e121ed8ecb
commit e4ac34da0d
2 changed files with 14 additions and 4 deletions

View File

@@ -324,7 +324,11 @@ class _GeneralState extends State<_General> {
kOptionSeparateRemoteWindow,
isServer: false,
update: () {
rustDeskWinManager.separateWindows();
final useSeparateWindow =
mainGetLocalBoolOptionSync(kOptionSeparateRemoteWindow);
if (useSeparateWindow) {
rustDeskWinManager.separateWindows();
}
},
),
];
@@ -1681,11 +1685,13 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
var ref = value.obs;
onChanged(option) async {
if (option != null) {
ref.value = option;
if (reverse) option = !option;
isServer
? await mainSetBoolOption(key, option)
: await mainSetLocalBoolOption(key, option);
ref.value = isServer
? mainGetBoolOptionSync(key)
: mainGetLocalBoolOptionSync(key);
update?.call();
}
}