stabilize connection

This commit is contained in:
schlagmichdoch 2022-12-31 18:03:37 +01:00
parent 6feeb6d4d9
commit 8dc0f1cb0c
2 changed files with 21 additions and 10 deletions

View file

@ -26,8 +26,7 @@ class PeersUI {
Events.on('peers', e => this._onPeers(e.detail));
Events.on('file-progress', e => this._onFileProgress(e.detail));
Events.on('paste', e => this._onPaste(e));
Events.on('offline', () => this._clearPeers());
Events.on('online', () => window.animateBackground(true));
Events.on('disconnect', _ => this._clearPeers());
this.peers = {};
}
@ -534,10 +533,12 @@ class NetworkStatusUI {
_showOfflineMessage() {
Events.fire('notify-user', 'You are offline');
window.animateBackground(false);
}
_showOnlineMessage() {
Events.fire('notify-user', 'You are back online');
window.animateBackground(true);
}
}