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.
|
/// The last message sent to this room.
|
||||||
String get lastMessage {
|
String get lastMessage {
|
||||||
if (events?.length > 0)
|
if (events != null && events.length > 0)
|
||||||
return events[0].getBody();
|
return events[0].getBody();
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -186,10 +186,11 @@ class Store {
|
||||||
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
||||||
directMap.forEach((String key, dynamic value) {
|
directMap.forEach((String key, dynamic value) {
|
||||||
if (value is List<dynamic> && value.length > 0)
|
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(
|
txn.rawUpdate(
|
||||||
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
||||||
[key, value[i]]);
|
[key, value[i]]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue