This commit is contained in:
parent
41ddc25cc9
commit
2622305951
|
@ -215,6 +215,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
naCamsOnly = new SimpleBooleanProperty(null, "filterNAcamsOnly", settings.filterNAcamsOnly);
|
naCamsOnly = new SimpleBooleanProperty(null, "filterNAcamsOnly", settings.filterNAcamsOnly);
|
||||||
naCamsOnly.addListener((obs, oldValue, newValue) -> {
|
naCamsOnly.addListener((obs, oldValue, newValue) -> {
|
||||||
settings.filterNAcamsOnly = newValue;
|
settings.filterNAcamsOnly = newValue;
|
||||||
|
Config.getInstance().getSettings().filterNAcamsOnly = newValue; // Ensure the config is updated
|
||||||
saveConfig();
|
saveConfig();
|
||||||
refreshChaturbateTabs(); // Refresh tabs when the setting changes
|
refreshChaturbateTabs(); // Refresh tabs when the setting changes
|
||||||
});
|
});
|
||||||
|
|
|
@ -80,8 +80,9 @@ public class ChaturbateTabProvider extends AbstractTabProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String buildUrl(String endpoint) {
|
private String buildUrl(String endpoint) {
|
||||||
boolean filterNA = Config.getInstance().isFilterNAcamsOnlyEnabled(); // Fetch latest setting
|
return apiUrl + endpoint + (Config.getInstance().getSettings().filterNAcamsOnly ? "®ions=NA" : "");
|
||||||
return apiUrl + endpoint + (filterNA ? "®ions=NA" : "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue