From 6ee4deab054c26a32326a1b53eb230a45c73adba Mon Sep 17 00:00:00 2001 From: lesetong <84658585+leset0ng@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:18:18 +0800 Subject: [PATCH] Fix duplicate items in Up list when showAllUp is enabled. (#1819) Overrode UpItem's == operator and hashCode using 'mid' to prevent redundant entries. --- lib/models/dynamics/up.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/models/dynamics/up.dart b/lib/models/dynamics/up.dart index 6650cd14b..8ceb5587a 100644 --- a/lib/models/dynamics/up.dart +++ b/lib/models/dynamics/up.dart @@ -93,4 +93,11 @@ class UpItem { mid = json['mid'] ?? 0; uname = json['uname']; } + + @override + bool operator ==(Object other) => + identical(this, other) || other is UpItem && mid == other.mid; + + @override + int get hashCode => mid.hashCode; }