mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 07:16:18 -04:00
stabilize connection
This commit is contained in:
parent
6feeb6d4d9
commit
8dc0f1cb0c
2 changed files with 21 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue