Skip to content

Commit

Permalink
Save settings improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Oct 6, 2024
1 parent f522868 commit 08ed6b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/366x366/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,14 @@ msgq.addEventListener("message", (messageKey, message) => {
const element = message.data[index];
try {
settings.settingUpdate(element);
if (index == message.data.length - 1) {
settings.applySettings();
}
} catch (e) {
console.error(e);
}
}

if (message.chunk == message.totalChunks) {
startingEl.style.display = "none";
settings.applySettings();
settings.saveSettings();
startingEl.style.display = "none";
} else {
var percent = Math.round((message.chunk / message.totalChunks) * 100);
startingTextTopEl.text = `${gettext("installing")} - ${percent}%`;
Expand Down
2 changes: 2 additions & 0 deletions src/366x366/app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function applySettings() {
}
}

saveSettings();

if (settings.hasOwnProperty("distanceUnit") && settings["distanceUnit"]) {
activity.distanceUnitSet(settings["distanceUnit"]);
} else {
Expand Down

0 comments on commit 08ed6b7

Please sign in to comment.