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() { void _addUpdate() {
// we only want max. one update per 50ms // we only want max. one update per 50ms
if (_updateTimer == null) { _updateTimer ??= Timer(Duration(milliseconds: 50), () {
_updateTimer = Timer(Duration(milliseconds: 50), () { onUpdate.add(true);
onUpdate.add(true); _updateTimer = null;
_updateTimer = null; });
});
}
} }
bool _disposed = false; bool _disposed = false;

View file

@ -106,7 +106,8 @@ class Room {
if (!partial || client.database == null) { if (!partial || client.database == null) {
return; 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) { for (final state in allStates) {
final newState = Event.fromDb(state, this); final newState = Event.fromDb(state, this);
setState(newState); setState(newState);