Merge pull request #731 from pangeachat/locked-toolbar-bug

add activity feedback to activity request hashcode to ensure new acti…
This commit is contained in:
ggurdin 2024-10-11 10:54:28 -04:00 committed by GitHub
commit 5529306ff5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -156,6 +156,20 @@ class ActivityQualityFeedback {
'bad_activity': badActivity.toJson(),
};
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is ActivityQualityFeedback &&
other.feedbackText == feedbackText &&
other.badActivity == badActivity;
}
@override
int get hashCode {
return feedbackText.hashCode ^ badActivity.hashCode;
}
}
class MessageActivityRequest {
@ -231,7 +245,9 @@ class MessageActivityRequest {
@override
int get hashCode {
return messageId.hashCode ^ const ListEquality().hash(tokensWithXP);
return messageId.hashCode ^
const ListEquality().hash(tokensWithXP) ^
activityQualityFeedback.hashCode;
}
}