mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
when replying to a conversation, change GUI accordingly and retain original toot's visibility
This commit is contained in:
parent
bedb2e2a4f
commit
e07efa46b3
@ -267,6 +267,11 @@ class BaseBuffer(base.Buffer):
|
|||||||
|
|
||||||
def reply(self, *args):
|
def reply(self, *args):
|
||||||
item = self.get_item()
|
item = self.get_item()
|
||||||
|
visibility = item.visibility
|
||||||
|
if visibility == "direct":
|
||||||
|
title = _("Conversation with {}").format(item.account.username)
|
||||||
|
caption = _("Write your message here")
|
||||||
|
else:
|
||||||
title = _("Reply to {}").format(item.account.username)
|
title = _("Reply to {}").format(item.account.username)
|
||||||
caption = _("Write your reply here")
|
caption = _("Write your reply here")
|
||||||
users = [user.acct for user in item.mentions if user.id != self.session.db["user_id"]]
|
users = [user.acct for user in item.mentions if user.id != self.session.db["user_id"]]
|
||||||
@ -277,7 +282,7 @@ class BaseBuffer(base.Buffer):
|
|||||||
users = toot.get_people()
|
users = toot.get_people()
|
||||||
if item.account.acct not in users and item.account.id != self.session.db["user_id"]:
|
if item.account.acct not in users and item.account.id != self.session.db["user_id"]:
|
||||||
users = "@{} {}".format(item.account.acct, users)
|
users = "@{} {}".format(item.account.acct, users)
|
||||||
call_threaded(self.session.send_toot, reply_to=item.id, users=users, toots=toot_data)
|
call_threaded(self.session.send_toot, reply_to=item.id, users=users, toots=toot_data, visibility=visibility)
|
||||||
if hasattr(toot.message, "destroy"):
|
if hasattr(toot.message, "destroy"):
|
||||||
toot.message.destroy()
|
toot.message.destroy()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user