Skip to content

Commit fac5927

Browse files
committed
fix(setting): Correct spelling of 'saveable' to 'savable'
1 parent 4943e61 commit fac5927

13 files changed

Lines changed: 75 additions & 75 deletions

HMCL/src/main/java/org/jackhuang/hmcl/setting/AccountStorages.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ public void setSchema(JsonSchema schema) {
8282
}
8383

8484
/// Whether this account storage list may be saved back to its JSON file.
85-
private transient boolean saveable = true;
85+
private transient boolean savable = true;
8686

8787
/// Returns whether this account storage list may be saved back to its JSON file.
8888
@Override
89-
public boolean isSaveable() {
90-
return saveable;
89+
public boolean isSavable() {
90+
return savable;
9191
}
9292

9393
/// Sets whether this account storage list may be saved back to its JSON file.
9494
@Override
95-
public void setSaveable(boolean saveable) {
96-
this.saveable = saveable;
95+
public void setSavable(boolean savable) {
96+
this.savable = savable;
9797
}
9898

9999
/// Serialized account entries.

HMCL/src/main/java/org/jackhuang/hmcl/setting/AuthlibInjectorServerList.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ public void setSchema(JsonSchema schema) {
9090
}
9191

9292
/// Whether this server list may be saved back to `authlib-injector-servers.json`.
93-
private transient boolean saveable = true;
93+
private transient boolean savable = true;
9494

9595
/// Returns whether this server list may be saved back to `authlib-injector-servers.json`.
9696
@Override
97-
public boolean isSaveable() {
98-
return saveable;
97+
public boolean isSavable() {
98+
return savable;
9999
}
100100

101101
/// Sets whether this server list may be saved back to `authlib-injector-servers.json`.
102102
@Override
103-
public void setSaveable(boolean saveable) {
104-
this.saveable = saveable;
103+
public void setSavable(boolean savable) {
104+
this.savable = savable;
105105
}
106106

107107
/// Authlib-injector authentication servers available for account login.

HMCL/src/main/java/org/jackhuang/hmcl/setting/GameDirectories.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ public void setSchema(JsonSchema schema) {
7171
}
7272

7373
/// Whether this game directory store may be saved back to its JSON file.
74-
private transient boolean saveable = true;
74+
private transient boolean savable = true;
7575

7676
/// Returns whether this game directory store may be saved back to its JSON file.
7777
@Override
78-
public boolean isSaveable() {
79-
return saveable;
78+
public boolean isSavable() {
79+
return savable;
8080
}
8181

8282
/// Sets whether this game directory store may be saved back to its JSON file.
8383
@Override
84-
public void setSaveable(boolean saveable) {
85-
this.saveable = saveable;
84+
public void setSavable(boolean savable) {
85+
this.savable = savable;
8686
}
8787

8888
/// Game directories stored in this file.

HMCL/src/main/java/org/jackhuang/hmcl/setting/GameSettings.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,18 @@ public void setSchema(JsonSchema schema) {
108108
}
109109

110110
/// Whether this instance setting may be saved back to its JSON file.
111-
private transient boolean saveable = true;
111+
private transient boolean savable = true;
112112

113113
/// Returns whether this instance setting may be saved back to its JSON file.
114114
@Override
115-
public boolean isSaveable() {
116-
return saveable;
115+
public boolean isSavable() {
116+
return savable;
117117
}
118118

119119
/// Sets whether this instance setting may be saved back to its JSON file.
120120
@Override
121-
public void setSaveable(boolean saveable) {
122-
this.saveable = saveable;
121+
public void setSavable(boolean savable) {
122+
this.savable = savable;
123123
}
124124

125125
/// The parent preset ID.

HMCL/src/main/java/org/jackhuang/hmcl/setting/GameSettingsPresets.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ public void setSchema(JsonSchema schema) {
8181
}
8282

8383
/// Whether this preset store may be saved back to `game-settings.json`.
84-
private transient boolean saveable = true;
84+
private transient boolean savable = true;
8585

8686
/// Returns whether this preset store may be saved back to `game-settings.json`.
8787
@Override
88-
public boolean isSaveable() {
89-
return saveable;
88+
public boolean isSavable() {
89+
return savable;
9090
}
9191

9292
/// Sets whether this preset store may be saved back to `game-settings.json`.
9393
@Override
94-
public void setSaveable(boolean saveable) {
95-
this.saveable = saveable;
94+
public void setSavable(boolean savable) {
95+
this.savable = savable;
9696
}
9797

9898
/// Reusable game setting presets.

HMCL/src/main/java/org/jackhuang/hmcl/setting/JsonSchemaSetting.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ interface JsonSchemaSetting {
3434
void setSchema(JsonSchema schema);
3535

3636
/// Returns whether this settings object may be saved back to its JSON file.
37-
boolean isSaveable();
37+
boolean isSavable();
3838

3939
/// Sets whether this settings object may be saved back to its JSON file.
4040
///
41-
/// @param saveable whether this settings object may be saved
42-
void setSaveable(boolean saveable);
41+
/// @param savable whether this settings object may be saved
42+
void setSavable(boolean savable);
4343
}

HMCL/src/main/java/org/jackhuang/hmcl/setting/JsonSettingFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ LoadResult<T> load(@Nullable T migrated) throws IOException {
116116
}
117117

118118
/// Creates a load result and stores the saveability metadata on the settings object.
119-
private LoadResult<T> result(T value, boolean saveable) {
120-
value.setSaveable(saveable);
119+
private LoadResult<T> result(T value, boolean savable) {
120+
value.setSavable(savable);
121121
return new LoadResult<>(value);
122122
}
123123

HMCL/src/main/java/org/jackhuang/hmcl/setting/LauncherSettings.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,18 @@ public void setSchema(JsonSchema schema) {
122122
}
123123

124124
/// Whether this launcher settings object may be saved back to `settings.json`.
125-
private transient boolean saveable = true;
125+
private transient boolean savable = true;
126126

127127
/// Returns whether this launcher settings object may be saved back to `settings.json`.
128128
@Override
129-
public boolean isSaveable() {
130-
return saveable;
129+
public boolean isSavable() {
130+
return savable;
131131
}
132132

133133
/// Sets whether this launcher settings object may be saved back to `settings.json`.
134134
@Override
135-
public void setSaveable(boolean saveable) {
136-
this.saveable = saveable;
135+
public void setSavable(boolean savable) {
136+
this.savable = savable;
137137
}
138138

139139
/// The launcher UI language.

HMCL/src/main/java/org/jackhuang/hmcl/setting/LauncherState.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ public void setSchema(JsonSchema schema) {
7474
}
7575

7676
/// Whether this launcher state may be saved back to `launcher-state.json`.
77-
private transient boolean saveable = true;
77+
private transient boolean savable = true;
7878

7979
/// Returns whether this launcher state may be saved back to `launcher-state.json`.
8080
@Override
81-
public boolean isSaveable() {
82-
return saveable;
81+
public boolean isSavable() {
82+
return savable;
8383
}
8484

8585
/// Sets whether this launcher state may be saved back to `launcher-state.json`.
8686
@Override
87-
public void setSaveable(boolean saveable) {
88-
this.saveable = saveable;
87+
public void setSavable(boolean savable) {
88+
this.savable = savable;
8989
}
9090

9191
/// The normalized launcher window content X position.

HMCL/src/main/java/org/jackhuang/hmcl/setting/SettingsManager.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public static void init() throws IOException {
428428
loadUserGameAccounts();
429429
loadGameAccounts(detachedSettingsFallback.accountStorages());
430430

431-
if (launcherSettings.isSaveable()) {
431+
if (launcherSettings.isSavable()) {
432432
launcherSettings.addListener(source -> {
433433
// Back up the invalid on-disk file the first time we are about to overwrite it.
434434
if (needBackupSettings) {
@@ -510,9 +510,9 @@ private static LauncherSettingsLoadResult loadLauncherSettings() throws IOExcept
510510
/// Creates a launcher settings load result and stores saveability metadata on the settings object.
511511
private static LauncherSettingsLoadResult launcherSettingsResult(
512512
LauncherSettings settings,
513-
boolean saveable,
513+
boolean savable,
514514
boolean unsupported) {
515-
settings.setSaveable(saveable);
515+
settings.setSavable(savable);
516516
return new LauncherSettingsLoadResult(settings, unsupported);
517517
}
518518

@@ -538,16 +538,16 @@ private static void loadGameDirectories(
538538
localGameDirectories = localResult.value();
539539
localGameDirectories.setUserFile(false);
540540
gameDirectories = mergeGameDirectories(userGameDirectories, localGameDirectories);
541-
if (localGameDirectories.isSaveable() || userGameDirectories.isSaveable()) {
541+
if (localGameDirectories.isSavable() || userGameDirectories.isSavable()) {
542542
gameDirectories.addListener((InvalidationListener) source -> saveGameDirectories());
543543
}
544544

545-
if (newlyCreatedLocal && localGameDirectories.isSaveable()) {
545+
if (newlyCreatedLocal && localGameDirectories.isSavable()) {
546546
LOG.info("Creating game directories file " + LOCAL_GAME_DIRECTORIES_LOCATION);
547547
saveLocalGameDirectories();
548548
}
549549

550-
if (newlyCreatedUser && userGameDirectories.isSaveable()) {
550+
if (newlyCreatedUser && userGameDirectories.isSavable()) {
551551
LOG.info("Creating user game directories file " + USER_GAME_DIRECTORIES_LOCATION);
552552
saveUserGameDirectories();
553553
}
@@ -577,10 +577,10 @@ private static void addMergedGameDirectory(ObservableList<Profile> merged, Profi
577577

578578
/// Saves the merged game directory store into the writable backing files.
579579
private static void saveGameDirectories() {
580-
if (localGameDirectories.isSaveable()) {
580+
if (localGameDirectories.isSavable()) {
581581
saveLocalGameDirectories();
582582
}
583-
if (userGameDirectories.isSaveable()) {
583+
if (userGameDirectories.isSavable()) {
584584
saveUserGameDirectories();
585585
}
586586
}
@@ -600,7 +600,7 @@ private static void saveUserGameDirectories() {
600600
/// Creates a game directory file containing only profiles that belong to the target storage location.
601601
private static GameDirectories createScopedGameDirectories(boolean userGameDirectories) {
602602
GameDirectories result = new GameDirectories();
603-
result.setSaveable(true);
603+
result.setSavable(true);
604604
result.setUserFile(userGameDirectories);
605605
for (Profile profile : getGameDirectories()) {
606606
if (profile.shouldSaveToUserGameDirectory() == userGameDirectories) {
@@ -625,12 +625,12 @@ private static void loadGameSettingsPresets(
625625
JsonSettingFile.LoadResult<GameSettingsPresets> result =
626626
GAME_SETTINGS_FILE.load(fallbackGameSettingsPresets);
627627
gameSettingsPresets = result.value();
628-
if (gameSettingsPresets.isSaveable()) {
628+
if (gameSettingsPresets.isSavable()) {
629629
GAME_SETTINGS_FILE.installAutoSave(gameSettingsPresets);
630630
}
631631
normalizeGameSettingsPresets();
632632

633-
if (newlyCreated && gameSettingsPresets.isSaveable()) {
633+
if (newlyCreated && gameSettingsPresets.isSavable()) {
634634
LOG.info("Creating game settings file " + GAME_SETTINGS_LOCATION);
635635
GAME_SETTINGS_FILE.save(gameSettingsPresets);
636636
}
@@ -660,11 +660,11 @@ private static void loadLauncherState(
660660
JsonSettingFile.LoadResult<LauncherState> result =
661661
STATE_FILE.load(fallbackLauncherState);
662662
launcherState = result.value();
663-
if (launcherState.isSaveable()) {
663+
if (launcherState.isSavable()) {
664664
STATE_FILE.installAutoSave(launcherState);
665665
}
666666

667-
if (newlyCreated && launcherState.isSaveable()) {
667+
if (newlyCreated && launcherState.isSavable()) {
668668
LOG.info("Creating launcher state file " + STATE_LOCATION);
669669
STATE_FILE.save(launcherState);
670670
}
@@ -687,11 +687,11 @@ private static void loadAuthlibInjectorServers(
687687
JsonSettingFile.LoadResult<AuthlibInjectorServerList> result =
688688
AUTHLIB_INJECTOR_SERVERS_FILE.load(fallbackAuthlibInjectorServers);
689689
authlibInjectorServers = result.value();
690-
if (authlibInjectorServers.isSaveable()) {
690+
if (authlibInjectorServers.isSavable()) {
691691
AUTHLIB_INJECTOR_SERVERS_FILE.installAutoSave(authlibInjectorServers);
692692
}
693693

694-
if (newlyCreated && authlibInjectorServers.isSaveable()) {
694+
if (newlyCreated && authlibInjectorServers.isSavable()) {
695695
LOG.info("Creating authlib-injector servers file " + AUTHLIB_INJECTOR_SERVERS_LOCATION);
696696
AUTHLIB_INJECTOR_SERVERS_FILE.save(authlibInjectorServers);
697697
}
@@ -711,11 +711,11 @@ private static void loadUserGameAccounts() {
711711
try {
712712
JsonSettingFile.LoadResult<AccountStorages> result = USER_GAME_ACCOUNTS_FILE.load(migrated);
713713
userGameAccounts = result.value();
714-
if (userGameAccounts.isSaveable()) {
714+
if (userGameAccounts.isSavable()) {
715715
USER_GAME_ACCOUNTS_FILE.installAutoSave(userGameAccounts);
716716
}
717717

718-
if (newlyCreated && userGameAccounts.isSaveable()) {
718+
if (newlyCreated && userGameAccounts.isSavable()) {
719719
LOG.info("Creating user game accounts file " + USER_GAME_ACCOUNTS_LOCATION);
720720
USER_GAME_ACCOUNTS_FILE.save(userGameAccounts);
721721
if (migrationResult != null) {
@@ -774,11 +774,11 @@ private static void loadGameAccounts(
774774
JsonSettingFile.LoadResult<AccountStorages> result =
775775
GAME_ACCOUNTS_FILE.load(fallbackGameAccounts);
776776
gameAccounts = result.value();
777-
if (gameAccounts.isSaveable()) {
777+
if (gameAccounts.isSavable()) {
778778
GAME_ACCOUNTS_FILE.installAutoSave(gameAccounts);
779779
}
780780

781-
if (newlyCreated && gameAccounts.isSaveable()) {
781+
if (newlyCreated && gameAccounts.isSavable()) {
782782
LOG.info("Creating game accounts file " + GAME_ACCOUNTS_LOCATION);
783783
GAME_ACCOUNTS_FILE.save(gameAccounts);
784784
}
@@ -858,11 +858,11 @@ private static void loadUserSettings(
858858
: null;
859859
JsonSettingFile.LoadResult<UserSettings> result = USER_SETTINGS_FILE.load(migratedUserSettings);
860860
userSettingsInstance = result.value();
861-
if (userSettingsInstance.isSaveable()) {
861+
if (userSettingsInstance.isSavable()) {
862862
USER_SETTINGS_FILE.installAutoSave(userSettingsInstance);
863863
}
864864

865-
if (newlyCreated && migratedUserSettings != null && userSettingsInstance.isSaveable()) {
865+
if (newlyCreated && migratedUserSettings != null && userSettingsInstance.isSavable()) {
866866
LOG.info("Creating user settings file " + USER_SETTINGS_LOCATION);
867867
USER_SETTINGS_FILE.save(userSettingsInstance);
868868
}
@@ -883,11 +883,11 @@ private static void loadUserState(
883883
: null;
884884
JsonSettingFile.LoadResult<UserState> result = USER_STATE_FILE.load(migratedUserState);
885885
userStateInstance = result.value();
886-
if (userStateInstance.isSaveable()) {
886+
if (userStateInstance.isSavable()) {
887887
USER_STATE_FILE.installAutoSave(userStateInstance);
888888
}
889889

890-
if (newlyCreated && userStateInstance.isSaveable()) {
890+
if (newlyCreated && userStateInstance.isSavable()) {
891891
LOG.info("Creating user state file " + USER_STATE_LOCATION);
892892
USER_STATE_FILE.save(userStateInstance);
893893
}

0 commit comments

Comments
 (0)