From 3efa330d69ca4e57964cfb4a7f6e3ca81833d05d Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Mon, 27 Jan 2020 11:50:12 +0100 Subject: [PATCH] Display a message in footer upon [P]in action And clear the message after 5s. --- toot/tui/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toot/tui/app.py b/toot/tui/app.py index c586845..1aaa2ce 100644 --- a/toot/tui/app.py +++ b/toot/tui/app.py @@ -221,8 +221,11 @@ class TUI(urwid.Frame): timelines = self.config.setdefault("timelines", {}) if hashtag in timelines: del timelines[hashtag] + self.footer.set_message("#{} unpinned".format(hashtag)) else: timelines[hashtag] = {"local": local} + self.footer.set_message("#{} pinned".format(hashtag)) + self.loop.set_alarm_in(5, lambda *args: self.footer.clear_message()) config.save_config(self.config) timeline = Timeline(name, statuses)