diff --git a/xradios/tui/buffers/display.py b/xradios/tui/buffers/display.py index 7331695..318cda2 100644 --- a/xradios/tui/buffers/display.py +++ b/xradios/tui/buffers/display.py @@ -19,7 +19,17 @@ def __init__(self, **kwargs): super().__init__( document=Document(content, 0), read_only=True, name=DISPLAY_BUFFER ) - self.metadata = None + self._metadata = None + + @property + def metadata(self): + return self._metadata + + @metadata.setter + def metadata(self, value): + if value != self._metadata: + self._metadata = value + self.update(value) def clear(self): self.set_document(Document('', 0), bypass_readonly=True) @@ -31,9 +41,8 @@ async def run(self): except Exception: pass else: - if result != self.metadata and all(result.values()): + if all(result.values()): self.metadata = result - self.update(result) await asyncio.sleep(30) def update(self, metadata):