Merge branch 'master' of gitlab.com:famedly/famedlysdk
This commit is contained in:
commit
31ef612330
|
@ -130,7 +130,7 @@ class Room {
|
|||
|
||||
/// The last message sent to this room.
|
||||
String get lastMessage {
|
||||
if (events?.length > 0)
|
||||
if (events != null && events.length > 0)
|
||||
return events[0].getBody();
|
||||
else
|
||||
return "";
|
||||
|
|
|
@ -186,10 +186,11 @@ class Store {
|
|||
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
||||
directMap.forEach((String key, dynamic value) {
|
||||
if (value is List<dynamic> && value.length > 0)
|
||||
for (int i = 0; i < value.length; i++)
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
txn.rawUpdate(
|
||||
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
||||
[key, value[i]]);
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue