From 496130cc905eb8759ccae0b32678420ce3343c7d Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Mon, 31 Aug 2020 14:25:12 -0700 Subject: [PATCH] Put sound/music volume settings in their own settings verison Fixes migration between 9b8745535bd7b31fab2fdecc38263018a43ced5f and 50e40888fdbc579c97995d875a003c27db2260d7. See https://github.com/tobspr/shapez.io/pull/611#issuecomment-684002678 --- src/js/profile/application_settings.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index c9e8c1e0..c9f798dc 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -529,7 +529,7 @@ export class ApplicationSettings extends ReadWriteProxy { } getCurrentVersion() { - return 24; + return 25; } /** @param {{settings: SettingsStorage, version: number}} data */ @@ -633,12 +633,16 @@ export class ApplicationSettings extends ReadWriteProxy { } if (data.version < 24) { - data.settings.musicVolume = 1.0; - data.settings.soundVolume = 1.0; data.settings.refreshRate = "60"; data.version = 24; } + if (data.version < 25) { + data.settings.musicVolume = 1.0; + data.settings.soundVolume = 1.0; + data.version = 25; + } + return ExplainedResult.good(); } }