mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
cancel sub on dispose and refactor row
This commit is contained in:
parent
16718fd88d
commit
6d24242489
1 changed files with 15 additions and 26 deletions
|
@ -305,6 +305,7 @@ class _WalletNetworkSettingsViewState
|
|||
_syncStatusSubscription.cancel();
|
||||
_refreshSubscription.cancel();
|
||||
_blocksRemainingSubscription?.cancel();
|
||||
_torConnectionStatusSubscription.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
@ -777,7 +778,6 @@ class _WalletNetworkSettingsViewState
|
|||
SizedBox(
|
||||
height: isDesktop ? 32 : 20,
|
||||
),
|
||||
if (TorService.sharedInstance.enabled)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -788,6 +788,7 @@ class _WalletNetworkSettingsViewState
|
|||
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||
: STextStyles.smallMed12(context),
|
||||
),
|
||||
if (TorService.sharedInstance.enabled)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
TorService.sharedInstance.stop();
|
||||
|
@ -797,19 +798,7 @@ class _WalletNetworkSettingsViewState
|
|||
style: STextStyles.link2(context),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (!TorService.sharedInstance.enabled)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Tor status",
|
||||
textAlign: TextAlign.left,
|
||||
style: isDesktop
|
||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||
: STextStyles.smallMed12(context),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
TorService.sharedInstance.start();
|
||||
|
|
Loading…
Reference in a new issue