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
1 changed files with 2 additions and 0 deletions

View File

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