diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-12-23 17:24:07 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-12-23 17:24:07 -0500 |
| commit | f62aa8b56139a758dbe1cd7b093d980c260cea18 (patch) | |
| tree | c92842a6d8c9531c365b06c3d996a706fab8bd9e /browset.py | |
| parent | 7f7c524cf1cd6188d8704af3d211ce2c0a8b4e6f (diff) | |
| download | browset-f62aa8b56139a758dbe1cd7b093d980c260cea18.tar.gz | |
Browset: Fully recreate gemtext widget on entry
Diffstat (limited to 'browset.py')
| -rw-r--r-- | browset.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/browset.py b/browset.py index 7ea57c6..9dce9c3 100644 --- a/browset.py +++ b/browset.py @@ -26,7 +26,8 @@ class Browset(App): yield Gemtext(txt=self.content, id="content") async def on_input_submitted(self, message: Input.Submitted) -> None: self.content = "## new stuff\n"+message.value - self.query_one("#content", Gemtext).update(self.content) + self.query_one("#content", Gemtext).remove() + self.mount(Gemtext(txt=self.content, id="content")) if __name__ == "__main__": app = Browset() |
