From 6b432b2fd365a3f228552b40ae15d47fcde26022 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Mon, 6 Mar 2023 19:36:43 -0500 Subject: [PATCH] Deduplicate and sort links for the show links function --- toot/tui/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toot/tui/app.py b/toot/tui/app.py index 79c18ad..0e3f6d1 100644 --- a/toot/tui/app.py +++ b/toot/tui/app.py @@ -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(