1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Deduplicate and sort links for the show links function

This commit is contained in:
Daniel Schwarz 2023-03-06 19:36:43 -05:00 committed by Ivan Habunek
parent 30792a0cab
commit 6b432b2fd3
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D

View File

@ -402,6 +402,8 @@ class TUI(urwid.Frame):
self.clear_screen() self.clear_screen()
if links: if links:
links = list(set(links)) # deduplicate links
links = sorted(links, key = lambda link: link[0]) # sort alphabetically by URL
sl_widget = StatusLinks(links) sl_widget = StatusLinks(links)
urwid.connect_signal(sl_widget, "clear-screen", _clear) urwid.connect_signal(sl_widget, "clear-screen", _clear)
self.open_overlay( self.open_overlay(