Merge branch 'sdk-fix-minor-bugs' into 'master'
[Sdk] fix minor bugs See merge request famedly/famedlysdk!109
This commit is contained in:
commit
fb0750b69a
|
@ -462,7 +462,7 @@ class Connection {
|
|||
}
|
||||
}
|
||||
|
||||
if (userTimestampMap[mxid]["ts"] is int) {
|
||||
if (userTimestampMap[mxid].containsKey("ts")) {
|
||||
if (receiptStateContent[eventID] == null)
|
||||
receiptStateContent[eventID] = {"m.read": {}};
|
||||
else if (receiptStateContent[eventID]["m.read"] == null)
|
||||
|
|
|
@ -180,7 +180,7 @@ class RoomList {
|
|||
bool sortLock = false;
|
||||
|
||||
sort() {
|
||||
if (sortLock) return;
|
||||
if (sortLock || rooms.length < 2) return;
|
||||
sortLock = true;
|
||||
rooms?.sort((a, b) =>
|
||||
b.timeCreated.toTimeStamp().compareTo(a.timeCreated.toTimeStamp()));
|
||||
|
|
|
@ -122,7 +122,7 @@ class Timeline {
|
|||
bool sortLock = false;
|
||||
|
||||
sort() {
|
||||
if (sortLock) return;
|
||||
if (sortLock || events.length < 2) return;
|
||||
sortLock = true;
|
||||
events
|
||||
?.sort((a, b) => b.time.toTimeStamp().compareTo(a.time.toTimeStamp()));
|
||||
|
|
Loading…
Reference in a new issue