From 42f3d478b18da3d943f96b596e59a0b92982117b Mon Sep 17 00:00:00 2001 From: Evan Kaloudis Date: Sun, 11 Dec 2022 19:45:33 -0500 Subject: [PATCH] Channels: fix lurker mode display --- components/Channels/ChannelItem.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/components/Channels/ChannelItem.tsx b/components/Channels/ChannelItem.tsx index 683de9c1a..1a9c11548 100644 --- a/components/Channels/ChannelItem.tsx +++ b/components/Channels/ChannelItem.tsx @@ -7,8 +7,12 @@ import { Row } from '../../components/layout/Row'; import { Status } from '../../views/Channels/ChannelsPane'; import Amount from '../Amount'; import { Tag } from './Tag'; + +import PrivacyUtils from './../../utils/PrivacyUtils'; import { themeColor } from './../../utils/ThemeUtils'; +import Stores from '../../stores/Stores'; + export function ChannelItem({ title, inbound, @@ -22,6 +26,10 @@ export function ChannelItem({ largestTotal?: number; status: Status; }) { + const { settings } = Stores.settingsStore; + const { privacy } = settings; + const lurkerMode = (privacy && privacy.lurkerMode) || false; + const percentOfLargest = largestTotal ? (Number(inbound) + Number(outbound)) / largestTotal : 1.0; @@ -37,17 +45,17 @@ export function ChannelItem({ > - {title} + {PrivacyUtils.sensitiveValue(title)}