From 9e07e39ba53e2b266dd20562b7816302a8b44fe8 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 16 Jan 2022 19:19:26 +1100 Subject: [PATCH] Fix mqtt diabled indicator --- src/components/menu/BottomNav.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/menu/BottomNav.tsx b/src/components/menu/BottomNav.tsx index 28af7090..7cbba3cf 100644 --- a/src/components/menu/BottomNav.tsx +++ b/src/components/menu/BottomNav.tsx @@ -32,6 +32,7 @@ import { Tooltip } from '../generic/Tooltip'; // } export const BottomNav = (): JSX.Element => { + const [showVersionInfo, setShowVersionInfo] = React.useState(false); const dispatch = useAppDispatch(); const meshtasticState = useAppSelector((state) => state.meshtastic); const appState = useAppSelector((state) => state.app); @@ -81,11 +82,14 @@ export const BottomNav = (): JSX.Element => {
{primaryChannelSettings?.uplinkEnabled && - primaryChannelSettings?.downlinkEnabled ? ( + primaryChannelSettings?.downlinkEnabled && + !meshtasticState.radio.preferences.mqttDisabled ? ( - ) : primaryChannelSettings?.uplinkEnabled ? ( + ) : primaryChannelSettings?.uplinkEnabled && + !meshtasticState.radio.preferences.mqttDisabled ? ( - ) : primaryChannelSettings?.downlinkEnabled ? ( + ) : primaryChannelSettings?.downlinkEnabled && + !meshtasticState.radio.preferences.mqttDisabled ? ( ) : ( @@ -96,15 +100,15 @@ export const BottomNav = (): JSX.Element => {