mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
Add posted status / reply to the top of the timeline on submit
This commit is contained in:
parent
2a6206903f
commit
747c5a611f
@ -575,6 +575,10 @@ class TimelineApp:
|
|||||||
|
|
||||||
self.footer.draw_message("Submitting status...", Color.YELLOW)
|
self.footer.draw_message("Submitting status...", Color.YELLOW)
|
||||||
response = api.post_status(app, user, content, spoiler_text=cw, sensitive=cw is not None)
|
response = api.post_status(app, user, content, spoiler_text=cw, sensitive=cw is not None)
|
||||||
|
status = parse_status(response)
|
||||||
|
self.statuses.insert(0, status)
|
||||||
|
self.selected += 1
|
||||||
|
self.left.draw_statuses(self.statuses, self.selected)
|
||||||
self.footer.draw_message("✓ Status posted", Color.GREEN)
|
self.footer.draw_message("✓ Status posted", Color.GREEN)
|
||||||
|
|
||||||
def reply(self):
|
def reply(self):
|
||||||
@ -596,6 +600,10 @@ class TimelineApp:
|
|||||||
|
|
||||||
self.footer.draw_message("Submitting reply...", Color.YELLOW)
|
self.footer.draw_message("Submitting reply...", Color.YELLOW)
|
||||||
response = api.post_status(app, user, content, spoiler_text=cw, sensitive=cw is not None, in_reply_to_id=status['id'])
|
response = api.post_status(app, user, content, spoiler_text=cw, sensitive=cw is not None, in_reply_to_id=status['id'])
|
||||||
|
status = parse_status(response)
|
||||||
|
self.statuses.insert(0, status)
|
||||||
|
self.selected += 1
|
||||||
|
self.left.draw_statuses(self.statuses, self.selected)
|
||||||
self.footer.draw_message("✓ Reply posted", Color.GREEN)
|
self.footer.draw_message("✓ Reply posted", Color.GREEN)
|
||||||
|
|
||||||
def toggle_reblog(self):
|
def toggle_reblog(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user