mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Bring back optimized background animation
This commit is contained in:
parent
8826893a42
commit
8a3c60d3a6
2 changed files with 140 additions and 53 deletions
|
@ -150,10 +150,17 @@ class PeersUI {
|
|||
}
|
||||
|
||||
_onPeerDisconnected(peerId) {
|
||||
// Remove peer from UI
|
||||
const $peer = $(peerId);
|
||||
if (!$peer) return;
|
||||
$peer.remove();
|
||||
this._evaluateOverflowingPeers();
|
||||
|
||||
// If no peer is shown -> start background animation again
|
||||
if ($$('x-peers:empty')) {
|
||||
Events.fire('background-animation', {animate: true});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_onRoomTypeRemoved(peerId, roomType) {
|
||||
|
@ -417,6 +424,9 @@ class PeerUI {
|
|||
|
||||
// ShareMode
|
||||
Events.on('share-mode-changed', e => this._onShareModeChanged(e.detail.active, e.detail.descriptor));
|
||||
|
||||
// Stop background animation
|
||||
Events.fire('background-animation', {animate: false});
|
||||
}
|
||||
|
||||
html() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue