Merge branch 'krille/fix-get-single-room' into 'main'
fix: Missing null check in get single room method See merge request famedly/company/frontend/famedlysdk!1032
This commit is contained in:
commit
e769f84b34
|
|
@ -1,3 +1,6 @@
|
||||||
|
## [0.9.3] - 11th May 2022
|
||||||
|
- fix: Missing null check in get single room method
|
||||||
|
|
||||||
## [0.9.2] - 10th May 2022
|
## [0.9.2] - 10th May 2022
|
||||||
- chore: Make path configurable in uiaLogin
|
- chore: Make path configurable in uiaLogin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -475,7 +475,7 @@ class FluffyBoxDatabase extends DatabaseApi {
|
||||||
.toList();
|
.toList();
|
||||||
final rawStates = await _roomStateBox.getAll(dbKeys);
|
final rawStates = await _roomStateBox.getAll(dbKeys);
|
||||||
for (final rawState in rawStates) {
|
for (final rawState in rawStates) {
|
||||||
if (rawState == null) continue;
|
if (rawState == null || rawState[''] == null) continue;
|
||||||
room.setState(Event.fromJson(copyMap(rawState['']), room));
|
room.setState(Event.fromJson(copyMap(rawState['']), room));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,7 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
|
||||||
// Get raw room from database:
|
// Get raw room from database:
|
||||||
final roomData = await _roomsBox.get(roomId);
|
final roomData = await _roomsBox.get(roomId);
|
||||||
if (roomData == null) return null;
|
if (roomData == null) return null;
|
||||||
final room = Room.fromJson(copyMap(roomData), client);
|
final room = Room.fromJson(convertToJson(roomData), client);
|
||||||
|
|
||||||
// Get important states:
|
// Get important states:
|
||||||
if (loadImportantStates) {
|
if (loadImportantStates) {
|
||||||
|
|
@ -533,8 +533,8 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
|
||||||
dbKeys.map((key) => _roomStateBox.get(key)),
|
dbKeys.map((key) => _roomStateBox.get(key)),
|
||||||
);
|
);
|
||||||
for (final rawState in rawStates) {
|
for (final rawState in rawStates) {
|
||||||
if (rawState == null) continue;
|
if (rawState == null || rawState[''] == null) continue;
|
||||||
room.setState(Event.fromJson(copyMap(rawState['']), room));
|
room.setState(Event.fromJson(convertToJson(rawState['']), room));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: matrix
|
name: matrix
|
||||||
description: Matrix Dart SDK
|
description: Matrix Dart SDK
|
||||||
version: 0.9.2
|
version: 0.9.3
|
||||||
homepage: https://famedly.com
|
homepage: https://famedly.com
|
||||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue