feat: ConfigRepository 添加 currentSourceId 存储
This commit is contained in:
@@ -30,6 +30,14 @@ class ConfigRepository(context: Context) {
|
||||
saveConfig(SiteConfig.default())
|
||||
}
|
||||
|
||||
fun getCurrentSourceId(): String {
|
||||
return prefs.getString("current_source_id", "xb6v") ?: "xb6v"
|
||||
}
|
||||
|
||||
fun setCurrentSourceId(id: String) {
|
||||
prefs.edit().putString("current_source_id", id).apply()
|
||||
}
|
||||
|
||||
fun getPresets(): List<SitePreset> = SitePreset.PRESETS
|
||||
|
||||
fun applyPreset(preset: SitePreset) {
|
||||
|
||||
Reference in New Issue
Block a user