Display a message in footer upon [P]in action

And clear the message after 5s.
This commit is contained in:
Denis Laxalde 2020-01-27 11:50:12 +01:00 committed by Ivan Habunek
parent 4d1fa837a1
commit 3efa330d69
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 3 additions and 0 deletions

View File

@ -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)