Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
feat: Ignore Overwolf-events in case of some games are doubly tracked.
Browse files Browse the repository at this point in the history
fixes #12
  • Loading branch information
itssimple committed Jul 12, 2021
1 parent e22f470 commit da65383
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripts/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ function GameTimeTrackerDatabase() {
settingsObject.sendPossibleGameData;
}

if (settingsObject.ignoreOverwolf !== undefined) {
updateSession.ignoreOverwolf = settingsObject.ignoreOverwolf;
}

cursor.update(updateSession);
}
};
Expand Down
18 changes: 18 additions & 0 deletions src/scripts/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ function loadSettings() {
"settingsAutomaticSendPossibleGame"
).checked = true;
}

if (_settings.ignoreOverwolf) {
document.getElementById("settingsIgnoreOverwolf").checked = true;
}
}
});
}
Expand Down Expand Up @@ -426,6 +430,20 @@ eventEmitter.addEventListener(
);
});

document
.getElementById("settingsIgnoreOverwolf")
.addEventListener("change", function (event) {
let ignoreOverwolf = event.target.checked;
db.setSettings(
{
ignoreOverwolf: ignoreOverwolf,
},
function () {
eventEmitter.emit("settings-changed");
}
);
});

document.getElementById("send-logs").addEventListener("click", function () {
let logButton = document.getElementById("send-logs");
logButton.innerText = "Uploading logs, please wait ...";
Expand Down
8 changes: 8 additions & 0 deletions src/windows/main-window.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ <h3>Settings</h3>
</label>
<small class="form-text text-muted">Enabling this setting, will send information in the background when we detect that you're playing a possible game, that we currently do not support.</small>
</div>
<br />
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="settingsIgnoreOverwolf">
<label for="settingsIgnoreOverwolf" class="custom-control-label">
Let Game Time Tracker do all the tracking (ignore Overwolf-supported games)
</label>
<small class="form-text text-muted">Enabling this setting, will still track games that Overwolf support, but with our own code instead.</small>
</div>
<hr noshade>
<h3>Support</h3>
<p class="form-text">To help us help you out with detection issues and other things, we need you to send us your logs, which can be done by pressing the button below!
Expand Down

0 comments on commit da65383

Please sign in to comment.