mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Refactor and cleanup
This commit is contained in:
parent
ab52a58fc5
commit
e9e8d6336b
3 changed files with 60 additions and 56 deletions
|
@ -25,16 +25,16 @@ class PeersUI {
|
|||
}
|
||||
|
||||
_onPeerLeft(peerId) {
|
||||
const peer = $(peerId);
|
||||
if (!peer) return;
|
||||
peer.remove();
|
||||
const $peer = $(peerId);
|
||||
if (!$peer) return;
|
||||
$peer.remove();
|
||||
}
|
||||
|
||||
_onFileProgress(progress) {
|
||||
const peerId = progress.sender || progress.recipient;
|
||||
const peer = $(peerId);
|
||||
if (!peer) return;
|
||||
peer.ui.setProgress(progress.progress);
|
||||
const $peer = $(peerId);
|
||||
if (!$peer) return;
|
||||
$peer.ui.setProgress(progress.progress);
|
||||
}
|
||||
|
||||
_clearPeers() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue