mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user