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

pull/102/head
Derek Schmidt 2019-03-29 15:49:24 -07:00 zatwierdzone przez Ivan Habunek
rodzic 2a6206903f
commit 747c5a611f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -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):