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:
parent
30792a0cab
commit
6b432b2fd3
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user