minor fixes [skip ci]

This commit is contained in:
OmarHatem
2025-11-17 18:59:56 +01:00
parent e7d21b8902
commit 954ac34c5b
2 changed files with 4 additions and 3 deletions
@@ -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,
+2 -1
View File
@@ -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<void> 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;
}