Skip to content

Commit

Permalink
fix for adblock startup issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelmerro committed Jun 21, 2020
1 parent 7ac4197 commit 34e4847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ ipcMain.on("create-session", (_, name, adblock, cache) => {
applyDevtoolsSettings(path.join(sessionDir, "Preferences"))
const newSession = session.fromPartition(name, {cache})
newSession.setPermissionRequestHandler(permissionHandler)
sessionList.push(name)
if (adblock !== "off") {
enableAdblocker([name])
}
Expand Down Expand Up @@ -547,7 +548,6 @@ ipcMain.on("create-session", (_, name, adblock, cache) => {
}
})
})
sessionList.push(name)
})
const cancellAllDownloads = () => {
downloads.forEach(download => {
Expand Down Expand Up @@ -667,7 +667,7 @@ const createAdblocker = () => {
console.log("Failed to read the files from blocklists folder", e)
}
blocker = ElectronBlocker.parse(filters)
enableAdblocker(sessionList)
enableAdblocker()
}
ipcMain.on("adblock-enable", () => {
enableAdblocker()
Expand Down

0 comments on commit 34e4847

Please sign in to comment.