mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 01:43:48 +00:00
fix persistent peerId if PWA
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user