This commit is contained in:
2018-05-04 16:45:37 +03:00
parent 9269bde518
commit 2be44de710
6 changed files with 23 additions and 20 deletions

View File

@@ -97,11 +97,16 @@ class NetworkManager {
}
private function onConnectionEvent(event:ConnectionEvent):Void {
L.d('Network', '${event}');
updateState(switch (event) {
case ConnectionEvent.CONNECTED: 'connected';
case ConnectionEvent.DISCONNECTED: 'offline';
case ConnectionEvent.ERROR(error): 'error';
case ConnectionEvent.CONNECTED:
L.d('Network', '$event');
'connected';
case ConnectionEvent.DISCONNECTED:
L.d('Network', '$event');
'offline';
case ConnectionEvent.ERROR(error):
L.e('Network', '$error');
'error';
});
}