Fix duplicate items in Up list when showAllUp is enabled. (#1819)

Overrode UpItem's == operator and hashCode using 'mid' to prevent
redundant entries.
This commit is contained in:
lesetong
2026-02-01 00:18:18 +08:00
committed by GitHub
parent 77fff92939
commit 6ee4deab05

View File

@@ -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;
}