mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +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;
|
mid = json['mid'] ?? 0;
|
||||||
uname = json['uname'];
|
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