1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 18:07:37 +03:00

UI Suit: Keep line hidden if Odyssey not detected

Else we'll show the line with '<Unknown>' always in Horizons
This commit is contained in:
Athanasius 2021-05-21 11:42:03 +01:00
parent 5e0bcb29a9
commit 0219098d05

View File

@ -620,6 +620,11 @@ class AppWindow(object):
def update_suit_text(self) -> None:
"""Update the suit text for current type and loadout."""
if not monitor.state['Odyssey']:
# Odyssey not detected, no text should be set so it will hide
self.suit['text'] = ''
return
if (suit := monitor.state.get('SuitCurrent')) is None:
self.suit['text'] = f'<{_("Unknown")}>'
return