mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
access tor service via provider in ui code
This commit is contained in:
parent
03a849d61f
commit
8135079046
2 changed files with 4 additions and 4 deletions
|
@ -177,7 +177,7 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
|||
eventBus = GlobalEventBus.instance;
|
||||
|
||||
// Initialize the TorConnectionStatus.
|
||||
_torConnectionStatus = TorService.sharedInstance.enabled
|
||||
_torConnectionStatus = ref.read(pTorService).enabled
|
||||
? TorConnectionStatus.connected
|
||||
: TorConnectionStatus.disconnected;
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class _TorSettingsState extends ConsumerState<TorSettings> {
|
|||
_prefs.useTor = true;
|
||||
|
||||
// Start the Tor service.
|
||||
TorService.sharedInstance.start();
|
||||
ref.read(pTorService).start();
|
||||
},
|
||||
);
|
||||
case TorConnectionStatus.connecting:
|
||||
|
@ -90,7 +90,7 @@ class _TorSettingsState extends ConsumerState<TorSettings> {
|
|||
_prefs.useTor = false;
|
||||
|
||||
// Stop the Tor service.
|
||||
TorService.sharedInstance.stop();
|
||||
ref.read(pTorService).stop();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class _TorSettingsState extends ConsumerState<TorSettings> {
|
|||
eventBus = GlobalEventBus.instance;
|
||||
|
||||
// Set the initial Tor connection status.
|
||||
_torConnectionStatus = TorService.sharedInstance.enabled
|
||||
_torConnectionStatus = ref.read(pTorService).enabled
|
||||
? TorConnectionStatus.connected
|
||||
: TorConnectionStatus.disconnected;
|
||||
|
||||
|
|
Loading…
Reference in a new issue