fix(youtube): save new instead of default value (#298)

This commit is contained in:
LisoUseInAIKyrios 2023-01-22 01:51:30 +04:00 committed by oSumAtrIX
parent 737246636b
commit 559bbf9778
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -343,19 +343,19 @@ public enum SettingsEnum {
switch (getReturnType()) { switch (getReturnType()) {
case FLOAT: case FLOAT:
SharedPrefHelper.saveFloat(sharedPref, path, (float) defaultValue); SharedPrefHelper.saveFloat(sharedPref, path, (float) newValue);
break; break;
case LONG: case LONG:
SharedPrefHelper.saveLong(sharedPref, path, (long) defaultValue); SharedPrefHelper.saveLong(sharedPref, path, (long) newValue);
break; break;
case BOOLEAN: case BOOLEAN:
SharedPrefHelper.saveBoolean(sharedPref, path, (boolean) newValue); SharedPrefHelper.saveBoolean(sharedPref, path, (boolean) newValue);
break; break;
case INTEGER: case INTEGER:
SharedPrefHelper.saveInt(sharedPref, path, (int) defaultValue); SharedPrefHelper.saveInt(sharedPref, path, (int) newValue);
break; break;
case STRING: case STRING:
SharedPrefHelper.saveString(sharedPref, path, (String) defaultValue); SharedPrefHelper.saveString(sharedPref, path, (String) newValue);
break; break;
default: default:
LogHelper.printException(() -> ("Setting does not have a valid Type. Name is: " + name())); LogHelper.printException(() -> ("Setting does not have a valid Type. Name is: " + name()));