Add posted status / reply to the top of the timeline on submit

This commit is contained in:
Derek Schmidt 2019-03-29 15:49:24 -07:00 committed by Ivan Habunek
parent 2a6206903f
commit 747c5a611f
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 8 additions and 0 deletions

View File

@ -575,6 +575,10 @@ class TimelineApp:
self.footer.draw_message("Submitting status...", Color.YELLOW)
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)
def reply(self):
@ -596,6 +600,10 @@ class TimelineApp:
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'])
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)
def toggle_reblog(self):