From 954ac34c5b1ab289d018688fad75948cfbe77d86 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 17 Nov 2025 18:59:56 +0100 Subject: [PATCH] minor fixes [skip ci] --- lib/src/screens/settings/background_sync_page.dart | 4 ++-- lib/utils/tor.dart | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/screens/settings/background_sync_page.dart b/lib/src/screens/settings/background_sync_page.dart index 355b303a4..5eac47a0b 100644 --- a/lib/src/screens/settings/background_sync_page.dart +++ b/lib/src/screens/settings/background_sync_page.dart @@ -111,9 +111,9 @@ class BackgroundSyncPage extends BasePage { return SettingsSwitcherCell( title: S.current.new_transactions_notifications, value: dashboardViewModel.backgroundSyncNotificationsEnabled, - onValueChange: (_, bool value) { + onValueChange: (_, bool value) async { try { - dashboardViewModel.setBackgroundSyncNotificationsEnabled(value); + await dashboardViewModel.setBackgroundSyncNotificationsEnabled(value); } catch (e) { showPopUp( context: context, diff --git a/lib/utils/tor.dart b/lib/utils/tor.dart index 877d216b0..a691ff655 100644 --- a/lib/utils/tor.dart +++ b/lib/utils/tor.dart @@ -3,11 +3,12 @@ import 'dart:io'; import 'package:cw_core/utils/proxy_wrapper.dart'; import 'package:cw_core/utils/print_verbose.dart'; +import 'package:cw_core/utils/tor/disabled.dart'; import 'package:flutter/material.dart'; bool didTorStart = false; Future ensureTorStopped({required BuildContext? context}) async { - if (!didTorStart) { + if (!didTorStart || CakeTor.instance is CakeTorDisabled) { printV("Tor hasn't been initialized yet, so it can't be stopped."); return; }