backup: before proxies page modernization

This commit is contained in:
Hiddify User
2025-12-26 02:39:35 +03:00
parent 6e73e53fb6
commit 063f2464ee
25 changed files with 1395 additions and 609 deletions

View File

@@ -18,7 +18,6 @@ class AdvancedSettingTiles extends HookConsumerWidget {
final t = ref.watch(translationsProvider);
final debug = ref.watch(debugModeNotifierProvider);
final perAppProxy = ref.watch(Preferences.perAppProxyMode).enabled;
final disableMemoryLimit = ref.watch(Preferences.disableMemoryLimit);
return Column(
@@ -33,28 +32,6 @@ class AdvancedSettingTiles extends HookConsumerWidget {
// // await const GeoAssetsRoute().push(context);
// },
// ),
if (Platform.isAndroid) ...[
ListTile(
title: Text(t.settings.network.perAppProxyPageTitle),
leading: const Icon(FluentIcons.apps_list_detail_24_regular),
trailing: Switch(
value: perAppProxy,
onChanged: (value) async {
final newMode = perAppProxy ? PerAppProxyMode.off : PerAppProxyMode.exclude;
await ref.read(Preferences.perAppProxyMode.notifier).update(newMode);
if (!perAppProxy && context.mounted) {
await const PerAppProxyRoute().push(context);
}
},
),
onTap: () async {
if (!perAppProxy) {
await ref.read(Preferences.perAppProxyMode.notifier).update(PerAppProxyMode.exclude);
}
if (context.mounted) await const PerAppProxyRoute().push(context);
},
),
],
SwitchListTile(
title: Text(t.settings.advanced.memoryLimit),
subtitle: Text(t.settings.advanced.memoryLimitMsg),