Fix race condition

This commit is contained in:
Paul Szymanski 2020-07-12 19:23:07 +02:00
parent ff2d146078
commit 229df6f3d6

View file

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