add activity feedback to activity request hashcode to ensure new activity is fetched after giving feedback

This commit is contained in:
ggurdin 2024-10-11 10:53:42 -04:00
parent 6c90d09a1a
commit 18d2399c54
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

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