mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 11:06:51 +08:00
opt: userInfoCache (#968)
This commit is contained in:
committed by
GitHub
parent
c75a68dacc
commit
e77fe2587c
@@ -111,6 +111,24 @@ class UserInfoData {
|
||||
shopUrl = json['shop_url'];
|
||||
isSeniorMember = json['is_senior_member'];
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(mid, uname, face, money, vipStatus);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
other is UserInfoData &&
|
||||
isLogin == other.isLogin &&
|
||||
face == other.face &&
|
||||
levelInfo == other.levelInfo &&
|
||||
mid == other.mid &&
|
||||
money == other.money &&
|
||||
uname == other.uname &&
|
||||
vipDueDate == other.vipDueDate &&
|
||||
vipStatus == other.vipStatus &&
|
||||
isSeniorMember == other.isSeniorMember;
|
||||
}
|
||||
}
|
||||
|
||||
@HiveType(typeId: 5)
|
||||
@@ -138,4 +156,13 @@ class LevelInfo {
|
||||
? json['current_exp']
|
||||
: json['next_exp'];
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => currentExp.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
other is LevelInfo && currentExp == other.currentExp;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user