Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/features/vpn/provider/available_servers_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:lantern/core/common/common.dart';
import 'package:lantern/core/models/available_servers.dart';
import 'package:lantern/core/models/server_location.dart';
import 'package:lantern/features/vpn/provider/server_location_notifier.dart';
import 'package:lantern/features/vpn/provider/vpn_status_notifier.dart';
Comment thread
jigar-f marked this conversation as resolved.
import 'package:lantern/lantern/lantern_service_notifier.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

Expand Down Expand Up @@ -102,6 +103,14 @@ class AvailableServersNotifier extends _$AvailableServersNotifier {
final fastest = servers.fastestLanternServer;
if (fastest == null) return;

///Don't push the fastest server if vpn is active
///it will override with what user connected server
Comment thread
jigar-f marked this conversation as resolved.
Outdated
final vpnStatus = ref.read(vPNStatusProvider).value?.status;
if (vpnStatus == VPNStatus.connected || vpnStatus == VPNStatus.connecting) {
appLogger.debug('Skipping Smart Location push, VPN is $vpnStatus');
return;
}
Comment thread
jigar-f marked this conversation as resolved.

Comment thread
jigar-f marked this conversation as resolved.
Outdated
final current = ref.read(serverLocationProvider);
if (current.serverType.toServerLocationType != ServerLocationType.auto) {
return;
Expand Down
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Future<void> _configureLocalTimeZone() async {
if (kIsWeb) return;

tz.initializeTimeZones();

try {
final timeZoneName = await FlutterTimezone.getLocalTimezone();
tz.setLocalLocation(tz.getLocation(timeZoneName.identifier));
Expand Down
Loading