mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-18 15:22:16 +00:00
fix persistent peerId if PWA
This commit is contained in:
@@ -114,7 +114,7 @@ class ServerConnection {
|
|||||||
|
|
||||||
_onDisplayName(msg) {
|
_onDisplayName(msg) {
|
||||||
sessionStorage.setItem("peerId", msg.message.peerId);
|
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
|
// make peerId persistent when pwa installed
|
||||||
PersistentStorage.set('peerId', msg.message.peerId).then(peerId => {
|
PersistentStorage.set('peerId', msg.message.peerId).then(peerId => {
|
||||||
console.log(`peerId saved to indexedDB: ${peerId}`);
|
console.log(`peerId saved to indexedDB: ${peerId}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user