newState and oldState on ConnectionStateUpdatedEvent

This commit is contained in:
Hiroshi Horie
2022-03-04 19:38:25 +09:00
parent d278310748
commit 21591e46e3
4 changed files with 32 additions and 12 deletions
+3 -1
View File
@@ -152,10 +152,12 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
bool didReconnect = _connectionState == ConnectionState.reconnecting &&
newValue == ConnectionState.connected;
final oldState = _connectionState;
_connectionState = newValue;
events.emit(SignalConnectionStateUpdatedEvent(
connectionState: _connectionState,
newState: _connectionState,
oldState: oldState,
didReconnect: didReconnect,
));
}