snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit 229df6f3d6f02b517d442226b316e6faf61f20e3
parent ff2d146078abd125161d7b1ebabf9f3ac50db9d2
Author: Paul Szymanski <519954+PaulSzymanski@users.noreply.github.com>
Date:   Sun, 12 Jul 2020 19:23:07 +0200

Fix race condition

Diffstat:
Mclient/scripts/ui.js | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/client/scripts/ui.js b/client/scripts/ui.js @@ -5,6 +5,11 @@ window.isDownloadSupported = (typeof document.createElement('a').download !== 'u window.isProductionEnvironment = !window.location.host.startsWith('localhost'); window.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; +// set display name +Events.on('displayName', e => { + $("displayName").textContent = "You are known as " + e.detail.message; +}); + class PeersUI { constructor() { @@ -492,11 +497,6 @@ class Snapdrop { const networkStatusUI = new NetworkStatusUI(); const webShareTargetUI = new WebShareTargetUI(); }); - - // set display name - Events.on('displayName', e => { - $("displayName").textContent = "You are known as " + e.detail.message; - }); } }