Skip to content

Commit

Permalink
Fixes an issue with getting the client Id.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderson1993 committed Apr 13, 2019
1 parent a8b7a21 commit ea1d78d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/helpers/externalPreload.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const webFrame = require("electron").webFrame;

let browserCount = require("electron").remote.getCurrentWindow().browserCount;
const key = "thorium_clientId";
const key = "thorium_clientPersistentId";
let clientId = sessionStorage.getItem(key);

webFrame.setVisualZoomLevelLimits(1, 1);
Expand All @@ -14,6 +14,7 @@ setClientId(
function setClient(id) {
sessionStorage.setItem(key, id);
clientId = id;
localStorage.setItem("thorium_clientId", id);
}

function setClientId(id) {
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ipAddress = require("./ipaddress");

let browserCount = require("electron").remote.getCurrentWindow().browserCount;

const key = "thorium_clientId";
const key = "thorium_clientPersistentId";
let clientId = sessionStorage.getItem(key);
webFrame.setVisualZoomLevelLimits(1, 1);
webFrame.setLayoutZoomLevelLimits(0, 0);
Expand All @@ -15,6 +15,7 @@ setClientId(

function setClient(id) {
sessionStorage.setItem(key, id);
localStorage.setItem("thorium_clientId", id);
clientId = id;
}

Expand Down Expand Up @@ -44,7 +45,6 @@ function getClientList() {
window.loadPage = function loadPage(url) {
let auto = false;
if (document.getElementById("remember-client").checked) auto = true;
console.log("loading page");
ipcRenderer.send("loadPage", { url, auto });
return;
};
Expand Down

0 comments on commit ea1d78d

Please sign in to comment.