mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 00:36:17 -04:00
fix persistent peerId if PWA
This commit is contained in:
parent
bf79f72741
commit
88e31407cb
1 changed files with 1 additions and 1 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue