From ff309ea4c5009049cdcb0ea876d9a98d84c52e14 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 22 Dec 2021 22:37:04 +0000 Subject: [PATCH] [GtkUI] Fix ETA sorting to match WebUI The sort for Ascending was putting longest eta first but seems more intuitive that the smallest time to wait should be first. The WebUI in previous commit swapped this behaviour so updating GtkUI. --- deluge/ui/gtk3/torrentview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/gtk3/torrentview.py b/deluge/ui/gtk3/torrentview.py index 3aee11e5c..46c0884b1 100644 --- a/deluge/ui/gtk3/torrentview.py +++ b/deluge/ui/gtk3/torrentview.py @@ -77,13 +77,13 @@ def eta_column_sort(model, iter1, iter2, data): if v1 == v2: return 0 if v1 == 0: - return 1 + return -1 if v2 == 0: - return -1 - if v1 > v2: return 1 - if v2 > v1: + if v1 > v2: return -1 + if v2 > v1: + return 1 def seed_peer_column_sort(model, iter1, iter2, data):