Skip to content

Commit 505b3e8

Browse files
author
Franco Bugnano
committed
Fixed crash related to list hashing
1 parent 6ae7923 commit 505b3e8

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

lib/src/conversation.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,16 @@ class Conversation extends _BaseConversation {
184184
return true;
185185
}
186186

187-
int get hashCode => hashValues(_session, participants, id, custom, welcomeMessages, photoUrl, subject);
187+
int get hashCode => hashValues(
188+
_session,
189+
hashList(participants),
190+
id,
191+
(custom != null ? hashList(custom!.keys) : custom),
192+
(custom != null ? hashList(custom!.values) : custom),
193+
(welcomeMessages != null ? hashList(welcomeMessages) : welcomeMessages),
194+
photoUrl,
195+
subject,
196+
);
188197
}
189198

190199
class ConversationData extends _BaseConversation {

lib/src/user.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,10 @@ class User extends _BaseUser {
236236
_session,
237237
_idOnly,
238238
availabilityText,
239-
custom,
240-
email,
241-
phone,
239+
(custom != null ? hashList(custom!.keys) : custom),
240+
(custom != null ? hashList(custom!.values) : custom),
241+
(email != null ? hashList(email) : email),
242+
(phone != null ? hashList(phone) : phone),
242243
id,
243244
name,
244245
locale,

0 commit comments

Comments
 (0)