enable rust default option

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-17 18:52:27 +08:00
parent 7bb39f5607
commit 75d8168070
9 changed files with 162 additions and 82 deletions

View File

@@ -246,13 +246,12 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
dismissOnClicked: true,
),
],
curOptionGetter: () async {
return await bind.sessionGetOption(id: key, arg: 'view-style') ??
'adaptive';
},
curOptionGetter: () async =>
// null means peer id is not found, which there's no need to care about
await bind.sessionGetViewStyle(id: key) ?? '',
optionSetter: (String oldValue, String newValue) async {
await bind.sessionPeerOption(
id: key, name: "view-style", value: newValue);
await bind.sessionSetViewStyle(
id: key, value: newValue);
ffi.canvasModel.updateViewStyle();
cancelFunc();
},