mastodon: feat: add support for pinning and unpinning posts

This commit is contained in:
2026-01-21 14:07:46 -06:00
parent 6e76cfb3a5
commit df81671eb7
12 changed files with 66 additions and 0 deletions
+8
View File
@@ -458,6 +458,14 @@ class Controller(object):
if hasattr(buffer, "edit_status"):
buffer.edit_status()
def pin_post(self, *args, **kwargs):
""" Pins or unpins a post in the current buffer. """
buffer = self.view.get_current_buffer()
if hasattr(buffer, "account"):
buffer = self.search_buffer(buffer.name, buffer.account)
if hasattr(buffer, "pin_status"):
buffer.pin_status()
def exit(self, *args, **kwargs):
if config.app["app-settings"]["ask_at_exit"] == True:
answer = commonMessageDialogs.exit_dialog(self.view)