minor fixes + ios config

This commit is contained in:
2026-04-18 01:06:18 +03:00
parent 429be8b83b
commit c344d6285e
9 changed files with 707 additions and 3 deletions

View File

@@ -175,6 +175,10 @@ final class VpnService extends ChangeNotifier {
}
Future<void> syncActiveConfig(StorageModel model) async {
if (!_supportsQuickTile) {
return;
}
final Map<String, dynamic>? payload = _buildActiveConfigPayload(model);
try {
@@ -221,6 +225,10 @@ final class VpnService extends ChangeNotifier {
}
Future<void> _syncTileConnectionState() async {
if (!_supportsQuickTile) {
return;
}
try {
await _quickTileChannel.invokeMethod<void>(
'setConnectionState',
@@ -236,4 +244,8 @@ final class VpnService extends ChangeNotifier {
unawaited(_statusSubscription?.cancel());
super.dispose();
}
bool get _supportsQuickTile {
return !kIsWeb && defaultTargetPlatform == TargetPlatform.android;
}
}