minor fixes + ios config
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user