1
0
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:
Ivan Habunek 2023-02-12 09:41:04 +01:00
parent ed1aea9cba
commit 3a9e4956a2
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D

View File

@ -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 " "