mirror of
https://github.com/ihabunek/toot
synced 2024-12-25 00:20:55 +01:00
Deduplicate and sort links for the show links function
This commit is contained in:
parent
30792a0cab
commit
6b432b2fd3
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user