From 4b3612326462c9c6aad8d205409e3bbf8fe23dee Mon Sep 17 00:00:00 2001 From: spinline Date: Wed, 4 Feb 2026 19:50:00 +0300 Subject: [PATCH] fix(ui): cleaner rewrite of torrent table without macro comments --- frontend/src/components/torrent/table.rs | 35 ++++-------------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/torrent/table.rs b/frontend/src/components/torrent/table.rs index c339037..0f0a8e5 100644 --- a/frontend/src/components/torrent/table.rs +++ b/frontend/src/components/torrent/table.rs @@ -98,11 +98,6 @@ pub fn TorrentTable() -> impl IntoView { SortColumn::DownSpeed => a.down_rate.cmp(&b.down_rate), SortColumn::UpSpeed => a.up_rate.cmp(&b.up_rate), SortColumn::ETA => { - // ETA 0 means infinity usually, so we need to handle it. - // But for simple sorting, maybe just treat is numeric? - // Let's treat 0 as MAX for ascending, MIN for descending? Or just as is? - // Usually negative or 0 means unknown/inf. - // Let's handle 0 as very large number for sorting purposes if we want it at the end of ascending let a_eta = if a.eta <= 0 { i64::MAX } else { a.eta }; let b_eta = if b.eta <= 0 { i64::MAX } else { b.eta }; a_eta.cmp(&b_eta) @@ -198,7 +193,7 @@ pub fn TorrentTable() -> impl IntoView { }; view! { -
// Added relative for positioning context if needed, though menu is fixed +