mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-08-18 10:58:11 +02:00
mastodon: feat: add support for pinning and unpinning posts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user