Skip to content

Commit

Permalink
feat: Flush session data only if "Update Chrome" issue occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Dec 8, 2021
1 parent 17c3f6c commit b40c29f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "altus",
"productName": "Altus",
"version": "4.5.3",
"version": "4.5.4",
"description": "Desktop client for WhatsApp Web with themes & multiple account support.",
"main": "src/index.js",
"homepage": "https://gitlab.com/amanharwara/altus",
Expand Down
8 changes: 7 additions & 1 deletion src/ipcHandlers/main/flushSessionData.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ const flushSessionData = ({ sender }) => {
let session = sender.session;
session.flushStorageData();
session.clearStorageData({
storages: ["appcache", "cachestorage"],
storages: [
"appcache",
"serviceworkers",
"cachestorage",
"websql",
"indexdb",
],
});
};

Expand Down
3 changes: 1 addition & 2 deletions src/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ let quickRepliesStore = new Store({
defaults: {},
});

ipcRenderer.send("flush-session-data");

window.onload = () => {
const title_element = document.querySelector(".landing-title");
if (title_element && title_element.innerHTML.includes("Google Chrome")) {
ipcRenderer.send("flush-session-data");
window.location.reload();
}

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ __metadata:
auto-launch: ^5.0.5
concurrently: ^6.2.0
dragula: ^3.7.3
electron: ^15.0.0
electron: ^15.3.0
electron-builder: ^22.11.7
electron-context-menu: ^3.1.1
electron-dl: ^3.2.1
Expand Down Expand Up @@ -1773,16 +1773,16 @@ __metadata:
languageName: node
linkType: hard

"electron@npm:^15.0.0":
version: 15.1.1
resolution: "electron@npm:15.1.1"
"electron@npm:^15.3.0":
version: 15.3.3
resolution: "electron@npm:15.3.3"
dependencies:
"@electron/get": ^1.13.0
"@types/node": ^14.6.2
extract-zip: ^1.0.3
bin:
electron: cli.js
checksum: be8b977cb611e403185d056d3037e35964b737ba43d34ef5394061516301978150b5f477663ec6023cd74b988a2114c1be283e8b2b00e4fb2b70a5593018b9af
checksum: 5340ca00c9624d5d39dcd3f478b460d970dcf8b2cb351f7d9476cae9ba524bf7c6b5e139c103279cbd70ee924f306f3e0714f0585b25ed9b94ace4066b3a59d9
languageName: node
linkType: hard

Expand Down

0 comments on commit b40c29f

Please sign in to comment.