move option video-save-directory and allow-auto-record-outgoing to local (#9715)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-10-22 08:24:52 +08:00
committed by GitHub
parent 6088920f8d
commit 6159449eba
7 changed files with 34 additions and 14 deletions

View File

@@ -580,7 +580,8 @@ class _GeneralState extends State<_General> {
kOptionAllowAutoRecordIncoming),
if (!bind.isIncomingOnly())
_OptionCheckBox(context, 'Automatically record outgoing sessions',
kOptionAllowAutoRecordOutgoing),
kOptionAllowAutoRecordOutgoing,
isServer: false),
if (showRootDir && !bind.isOutgoingOnly())
Row(
children: [
@@ -635,7 +636,7 @@ class _GeneralState extends State<_General> {
await FilePicker.platform.getDirectoryPath(
initialDirectory: initialDirectory);
if (selectedDirectory != null) {
await bind.mainSetOption(
await bind.mainSetLocalOption(
key: kOptionVideoSaveDirectory,
value: selectedDirectory);
setState(() {});

View File

@@ -106,7 +106,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
_autoRecordIncomingSession = option2bool(kOptionAllowAutoRecordIncoming,
bind.mainGetOptionSync(key: kOptionAllowAutoRecordIncoming));
_autoRecordOutgoingSession = option2bool(kOptionAllowAutoRecordOutgoing,
bind.mainGetOptionSync(key: kOptionAllowAutoRecordOutgoing));
bind.mainGetLocalOption(key: kOptionAllowAutoRecordOutgoing));
_localIP = bind.mainGetOptionSync(key: 'local-ip-addr');
_directAccessPort = bind.mainGetOptionSync(key: kOptionDirectAccessPort);
_allowAutoDisconnect = option2bool(kOptionAllowAutoDisconnect,
@@ -711,13 +711,13 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
onToggle: isOptionFixed(kOptionAllowAutoRecordOutgoing)
? null
: (v) async {
await bind.mainSetOption(
await bind.mainSetLocalOption(
key: kOptionAllowAutoRecordOutgoing,
value: bool2option(
kOptionAllowAutoRecordOutgoing, v));
final newValue = option2bool(
kOptionAllowAutoRecordOutgoing,
await bind.mainGetOption(
bind.mainGetLocalOption(
key: kOptionAllowAutoRecordOutgoing));
setState(() {
_autoRecordOutgoingSession = newValue;