mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 15:26:17 -04:00
restart animation when last peer leaves
This commit is contained in:
parent
51542e9dce
commit
800cf1712c
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ class PeersUI {
|
||||||
Events.on('file-progress', e => this._onFileProgress(e.detail));
|
Events.on('file-progress', e => this._onFileProgress(e.detail));
|
||||||
Events.on('paste', e => this._onPaste(e));
|
Events.on('paste', e => this._onPaste(e));
|
||||||
Events.on('offline', () => this._clearPeers());
|
Events.on('offline', () => this._clearPeers());
|
||||||
|
Events.on('online', () => window.animateBackground(true));
|
||||||
this.peers = {};
|
this.peers = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ class PeersUI {
|
||||||
const $peer = $(peerId);
|
const $peer = $(peerId);
|
||||||
if (!$peer) return;
|
if (!$peer) return;
|
||||||
$peer.remove();
|
$peer.remove();
|
||||||
|
setTimeout(e => window.animateBackground(true), 1750); // Start animation again
|
||||||
}
|
}
|
||||||
|
|
||||||
_onPeerLeft(peerId) {
|
_onPeerLeft(peerId) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue