diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart index 7fcc9f4ca..33acd0d62 100644 --- a/lib/pages/home_view/home_view.dart +++ b/lib/pages/home_view/home_view.dart @@ -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/unread_notifications_provider.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/theme_providers.dart'; import 'package:stackwallet/utilities/assets.dart'; @@ -261,7 +262,32 @@ class _HomeViewState extends ConsumerState { color: Theme.of(context) .extension()! .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()! + .accentColorYellow, + width: 20, + height: 20, + ) + : SvgPicture.asset( + Assets.svg.tor, + color: Theme.of(context) + .extension()! + .accentColorGreen, + width: 20, + height: 20, + ) + : SvgPicture.asset( + Assets.svg.tor, + color: Theme.of(context) + .extension()! + .textSubtitle3, + width: 20, + height: 20, + ), onPressed: () { Navigator.of(context) .pushNamed(TorSettingsView.routeName);