kopia lustrzana https://github.com/ihabunek/toot
Show error if trying to boost unboostables in TUI
rodzic
29ff629464
commit
5c98d4ac80
|
@ -497,6 +497,13 @@ class TUI(urwid.Frame):
|
||||||
new_status = self.make_status(new_data)
|
new_status = self.make_status(new_data)
|
||||||
timeline.update_status(new_status)
|
timeline.update_status(new_status)
|
||||||
|
|
||||||
|
# Check if status is rebloggable
|
||||||
|
no_reblog_because_private = status.visibility == "private" and not status.is_mine
|
||||||
|
no_reblog_because_direct = status.visibility == "direct"
|
||||||
|
if no_reblog_because_private or no_reblog_because_direct:
|
||||||
|
self.footer.set_error_message("You may not reblog this {} status".format(status.visibility))
|
||||||
|
return
|
||||||
|
|
||||||
self.run_in_thread(
|
self.run_in_thread(
|
||||||
_unreblog if status.reblogged else _reblog,
|
_unreblog if status.reblogged else _reblog,
|
||||||
done_callback=_done
|
done_callback=_done
|
||||||
|
|
|
@ -60,6 +60,7 @@ class Status:
|
||||||
self.url = data.get("url")
|
self.url = data.get("url")
|
||||||
self.mentions = data.get("mentions")
|
self.mentions = data.get("mentions")
|
||||||
self.reblog = self._get_reblog()
|
self.reblog = self._get_reblog()
|
||||||
|
self.visibility = data.get("visibility")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def original(self):
|
def original(self):
|
||||||
|
|
Ładowanie…
Reference in New Issue