fix persistent peerId if PWA

This commit is contained in:
schlagmichdoch 2023-01-22 17:36:15 +01:00
parent bf79f72741
commit 88e31407cb

View file

@ -114,7 +114,7 @@ class ServerConnection {
_onDisplayName(msg) {
sessionStorage.setItem("peerId", msg.message.peerId);
if (window.matchMedia('(display-mode: standalone)').matches) {
if (window.matchMedia('(display-mode: minimal-ui)').matches) {
// make peerId persistent when pwa installed
PersistentStorage.set('peerId', msg.message.peerId).then(peerId => {
console.log(`peerId saved to indexedDB: ${peerId}`);