mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
hook mobile home view onion up to tor status
This commit is contained in:
parent
6594e3c0cf
commit
17e83a68a3
1 changed files with 27 additions and 1 deletions
|
@ -26,6 +26,7 @@ import 'package:stackwallet/providers/global/notifications_provider.dart';
|
||||||
import 'package:stackwallet/providers/ui/home_view_index_provider.dart';
|
import 'package:stackwallet/providers/ui/home_view_index_provider.dart';
|
||||||
import 'package:stackwallet/providers/ui/unread_notifications_provider.dart';
|
import 'package:stackwallet/providers/ui/unread_notifications_provider.dart';
|
||||||
import 'package:stackwallet/services/event_bus/events/global/tor_connection_status_changed_event.dart';
|
import 'package:stackwallet/services/event_bus/events/global/tor_connection_status_changed_event.dart';
|
||||||
|
import 'package:stackwallet/services/tor_service.dart';
|
||||||
import 'package:stackwallet/themes/stack_colors.dart';
|
import 'package:stackwallet/themes/stack_colors.dart';
|
||||||
import 'package:stackwallet/themes/theme_providers.dart';
|
import 'package:stackwallet/themes/theme_providers.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
@ -261,7 +262,32 @@ class _HomeViewState extends ConsumerState<HomeView> {
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
.backgroundAppBar,
|
.backgroundAppBar,
|
||||||
icon: _buildTorIcon(TorConnectionStatus.disconnected),
|
icon: ref.watch(pTorService).enabled
|
||||||
|
? ref.read(pTorService).proxyInfo.port == -1
|
||||||
|
? SvgPicture.asset(
|
||||||
|
Assets.svg.tor,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorYellow,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
)
|
||||||
|
: SvgPicture.asset(
|
||||||
|
Assets.svg.tor,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorGreen,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
)
|
||||||
|
: SvgPicture.asset(
|
||||||
|
Assets.svg.tor,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle3,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.pushNamed(TorSettingsView.routeName);
|
.pushNamed(TorSettingsView.routeName);
|
||||||
|
|
Loading…
Reference in a new issue