From c8823d852547dd0af318010584ab11e3e55dd62c Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 18 Mar 2024 14:08:16 +0000 Subject: [PATCH] watch with async --- src/textual/widgets/_header.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/widgets/_header.py b/src/textual/widgets/_header.py index ac9aeef649..62ebe8879c 100644 --- a/src/textual/widgets/_header.py +++ b/src/textual/widgets/_header.py @@ -192,10 +192,10 @@ def screen_sub_title(self) -> str: return sub_title def _on_mount(self, _: Mount) -> None: - def set_title() -> None: + async def set_title() -> None: self.query_one(HeaderTitle).text = self.screen_title - def set_sub_title(sub_title: str) -> None: + async def set_sub_title() -> None: self.query_one(HeaderTitle).sub_text = self.screen_sub_title self.watch(self.app, "title", set_title)