mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +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();
|
_syncStatusSubscription.cancel();
|
||||||
_refreshSubscription.cancel();
|
_refreshSubscription.cancel();
|
||||||
_blocksRemainingSubscription?.cancel();
|
_blocksRemainingSubscription?.cancel();
|
||||||
|
_torConnectionStatusSubscription.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -777,7 +778,6 @@ class _WalletNetworkSettingsViewState
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: isDesktop ? 32 : 20,
|
height: isDesktop ? 32 : 20,
|
||||||
),
|
),
|
||||||
if (TorService.sharedInstance.enabled)
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
@ -788,6 +788,7 @@ class _WalletNetworkSettingsViewState
|
||||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||||
: STextStyles.smallMed12(context),
|
: STextStyles.smallMed12(context),
|
||||||
),
|
),
|
||||||
|
if (TorService.sharedInstance.enabled)
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
TorService.sharedInstance.stop();
|
TorService.sharedInstance.stop();
|
||||||
|
@ -797,19 +798,7 @@ class _WalletNetworkSettingsViewState
|
||||||
style: STextStyles.link2(context),
|
style: STextStyles.link2(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
if (!TorService.sharedInstance.enabled)
|
if (!TorService.sharedInstance.enabled)
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Tor status",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: isDesktop
|
|
||||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
|
||||||
: STextStyles.smallMed12(context),
|
|
||||||
),
|
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
TorService.sharedInstance.start();
|
TorService.sharedInstance.start();
|
||||||
|
|
Loading…
Reference in a new issue