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,17 +778,17 @@ class _WalletNetworkSettingsViewState
|
|||
SizedBox(
|
||||
height: isDesktop ? 32 : 20,
|
||||
),
|
||||
if (TorService.sharedInstance.enabled)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Tor status",
|
||||
textAlign: TextAlign.left,
|
||||
style: isDesktop
|
||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||
: STextStyles.smallMed12(context),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Tor status",
|
||||
textAlign: TextAlign.left,
|
||||
style: isDesktop
|
||||
? 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),
|
||||
),
|
||||
if (!TorService.sharedInstance.enabled)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
TorService.sharedInstance.start();
|
||||
|
@ -819,8 +808,8 @@ class _WalletNetworkSettingsViewState
|
|||
style: STextStyles.link2(context),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: isDesktop ? 12 : 9,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue