analyze and format

This commit is contained in:
Sorunome 2020-06-30 12:21:03 +02:00
parent a1f8120c59
commit 2e3d8205b1
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 6 additions and 7 deletions

View File

@ -1432,12 +1432,10 @@ class Client {
void _addUpdate() {
// we only want max. one update per 50ms
if (_updateTimer == null) {
_updateTimer = Timer(Duration(milliseconds: 50), () {
onUpdate.add(true);
_updateTimer = null;
});
}
_updateTimer ??= Timer(Duration(milliseconds: 50), () {
onUpdate.add(true);
_updateTimer = null;
});
}
bool _disposed = false;

View File

@ -106,7 +106,8 @@ class Room {
if (!partial || client.database == null) {
return;
}
final allStates = await client.database.getAllRoomStatesForRoom(client.id, id).get();
final allStates =
await client.database.getAllRoomStatesForRoom(client.id, id).get();
for (final state in allStates) {
final newState = Event.fromDb(state, this);
setState(newState);