IMPROVED VERSION: Show media attachments in the "L" list of links
This commit is contained in:
parent
12d682591b
commit
0d20a4878b
1 changed files with 5 additions and 0 deletions
|
@ -325,6 +325,11 @@ class TUI(urwid.Frame):
|
||||||
|
|
||||||
def show_links(self, status):
|
def show_links(self, status):
|
||||||
links = parse_content_links(status.data["content"]) if status else []
|
links = parse_content_links(status.data["content"]) if status else []
|
||||||
|
post_attachments = status.data["media_attachments"] or []
|
||||||
|
reblog_attachments = (status.data["reblog"]["media_attachments"] if status.data["reblog"] else None) or []
|
||||||
|
for a in post_attachments + reblog_attachments:
|
||||||
|
url = a["remote_url"] or a["url"]
|
||||||
|
links.append((url, a["description"] if a["description"] else url))
|
||||||
if links:
|
if links:
|
||||||
self.open_overlay(
|
self.open_overlay(
|
||||||
widget=StatusLinks(links),
|
widget=StatusLinks(links),
|
||||||
|
|
Loading…
Reference in a new issue