Skip to content

Commit ca27714

Browse files
Merge remote-tracking branch 'origin/dev' into release
# Conflicts: # pubspec.yaml
2 parents 5d92b4e + 158a53a commit ca27714

7 files changed

Lines changed: 63 additions & 12 deletions

File tree

lib/core/data/local/remote/api/flowline_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class FlowlineService implements IFlowlineService {
3333
Future<String> getCachedFlowLine() => _vpnBridge.getCachedFlowLine();
3434

3535
@override
36+
3637
Future<void> saveFlowline(bool offlineMode) async {
3738
final prefs = await SharedPreferences.getInstance();
3839
final lastFlowlineUpdate = prefs.getInt(lastFlowlineUpdateKey) ?? 0;

lib/modules/main/presentation/widgets/connection_state_widgets.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:defyx_vpn/modules/settings/providers/settings_provider.dart';
12
import 'package:defyx_vpn/shared/providers/group_provider.dart';
23
import 'package:defyx_vpn/shared/services/animation_service.dart';
34
import 'package:flutter/material.dart';
@@ -239,6 +240,22 @@ class AnalyzingContent extends ConsumerWidget {
239240
return Row(
240241
children: [
241242
Consumer(builder: (context, ref, child) {
243+
final deepScanEnabled =
244+
ref.read(settingsProvider.notifier).isDeepScanEnabled();
245+
if (deepScanEnabled) {
246+
return Container(
247+
margin: const EdgeInsets.only(bottom: 3.0),
248+
child: Text(
249+
"∞",
250+
style: TextStyle(
251+
color: const Color(0xFFA7A7A7),
252+
fontSize: 24.sp,
253+
fontFamily: 'Lato',
254+
fontWeight: FontWeight.w400,
255+
),
256+
));
257+
}
258+
242259
final flowLineState = ref.watch(flowLineStepProvider);
243260
final currentStep = flowLineState.step;
244261
final totalSteps = flowLineState.totalSteps;

lib/modules/settings/providers/settings_provider.dart

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class SettingsNotifier extends StateNotifier<SettingsState> {
4848
// ============== Initialization ==============
4949

5050
Future<void> _initializeSettings() async {
51+
await _loadSettingsFromStorage();
5152
await _updateConnectionMethodFromFlowLine();
5253
_ensureStaticGroups();
5354
_isInitialized = true;
@@ -109,16 +110,20 @@ class SettingsNotifier extends StateNotifier<SettingsState> {
109110
final savedGroup = state.groups[SettingsGroupId.trafficControl];
110111

111112
return SettingsFactory.createTrafficControlGroup(
112-
splitTunnelEnabled: SettingsFactory.getSavedItemState(
113-
savedGroup?.items,
114-
SettingsItemId.splitTunnel,
115-
),
116-
killSwitchEnabled: SettingsFactory.getSavedItemState(
117-
savedGroup?.items,
118-
SettingsItemId.killSwitch,
119-
),
120-
);
113+
splitTunnelEnabled: SettingsFactory.getSavedItemState(
114+
savedGroup?.items,
115+
SettingsItemId.splitTunnel,
116+
),
117+
killSwitchEnabled: SettingsFactory.getSavedItemState(
118+
savedGroup?.items,
119+
SettingsItemId.killSwitch,
120+
),
121+
deepScanEnabled: SettingsFactory.getSavedItemState(
122+
savedGroup?.items,
123+
SettingsItemId.deepScan,
124+
));
121125
}
126+
122127
bool isDeepScanEnabled() {
123128
final savedGroup = state.groups[SettingsGroupId.trafficControl];
124129
return SettingsFactory.getSavedItemState(
@@ -225,9 +230,33 @@ class SettingsNotifier extends StateNotifier<SettingsState> {
225230
}
226231
}
227232

233+
Future<void> _loadSettingsFromStorage() async {
234+
final jsonString =
235+
await _secureStorage?.read(SettingsStorageKey.appSettings);
236+
237+
if (jsonString == null) return;
238+
239+
try {
240+
final Map<String, dynamic> decoded = jsonDecode(jsonString);
241+
242+
final groups = decoded.map(
243+
(key, value) => MapEntry(
244+
key,
245+
SettingsGroup.fromJson(value),
246+
),
247+
);
248+
249+
state = state.copyWith(groups: groups);
250+
debugPrint('Settings loaded from storage');
251+
} catch (e) {
252+
debugPrint('Failed to load settings: $e');
253+
}
254+
}
255+
228256
// ============== Public Actions ==============
229257

230258
void toggleSetting(String groupId, String itemId, [BuildContext? context]) {
259+
print('Toggling setting: $groupId - $itemId');
231260
final group = state.groups[groupId];
232261
if (group == null) return;
233262

lib/shared/global_vars.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter_dotenv/flutter_dotenv.dart';
22

33
class GlobalVars {
4-
static const String appBuildType = 'github';
4+
static const String appBuildType = 'appStore';
55

66
static String get appStore => dotenv.env['LINK_APP_STORE'] ?? '';
77
static String get testFlight => dotenv.env['LINK_TEST_FLIGHT'] ?? '';

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: defyx_vpn
22
description: "A new Vpn app"
33
publish_to: "none"
4-
version: 3.8.2+234
4+
version: 3.8.3+235
55

66
environment:
77
sdk: ^3.5.3
@@ -100,7 +100,7 @@ msix_config:
100100
display_name: Defyx VPN
101101
publisher_display_name: UnboundTech UG
102102
identity_name: UnboundTechUG.6065AEC5A207
103-
msix_version: 3.8.2.0
103+
msix_version: 3.8.3.0
104104
publisher: "CN=62937938-2AE2-4C12-9ED8-4C418C0CADF2"
105105
logo_path: assets/images/logo.png
106106
capabilities: runFullTrust,internetClientServer,privateNetworkClientServer,unvirtualizedResources

windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <audioplayers_windows/audioplayers_windows_plugin.h>
1010
#include <battery_plus/battery_plus_windows_plugin.h>
1111
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
12+
#include <firebase_core/firebase_core_plugin_c_api.h>
1213
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
1314
#include <flutter_timezone/flutter_timezone_plugin_c_api.h>
1415
#include <url_launcher_windows/url_launcher_windows.h>
@@ -20,6 +21,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
2021
registry->GetRegistrarForPlugin("BatteryPlusWindowsPlugin"));
2122
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
2223
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
24+
FirebaseCorePluginCApiRegisterWithRegistrar(
25+
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
2326
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
2427
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
2528
FlutterTimezonePluginCApiRegisterWithRegistrar(

windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
66
audioplayers_windows
77
battery_plus
88
connectivity_plus
9+
firebase_core
910
flutter_secure_storage_windows
1011
flutter_timezone
1112
url_launcher_windows

0 commit comments

Comments
 (0)