mirror of
https://github.com/ihabunek/toot
synced 2024-12-23 23:52:40 +01:00
Don't break if edited_at does not exist
Introduced in mastodon 4. fixes #309
This commit is contained in:
parent
ed1aea9cba
commit
3a9e4956a2
@ -427,7 +427,7 @@ class StatusDetails(urwid.Pile):
|
||||
|
||||
class StatusListItem(SelectableColumns):
|
||||
def __init__(self, status):
|
||||
edited = status.data["edited_at"]
|
||||
edited_at = status.data.get("edited_at")
|
||||
|
||||
# TODO: hacky implementation to avoid creating conflicts for existing
|
||||
# pull reuqests, refactor when merged.
|
||||
@ -437,7 +437,7 @@ class StatusListItem(SelectableColumns):
|
||||
else status.created_at.strftime("%Y-%m-%d %H:%M")
|
||||
)
|
||||
|
||||
edited_flag = "*" if edited else " "
|
||||
edited_flag = "*" if edited_at else " "
|
||||
favourited = ("yellow", "★") if status.original.favourited else " "
|
||||
reblogged = ("yellow", "♺") if status.original.reblogged else " "
|
||||
is_reblog = ("cyan", "♺") if status.reblog else " "
|
||||
|
Loading…
Reference in New Issue
Block a user