mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
更新XSPUtils
This commit is contained in:
@@ -7,12 +7,15 @@ object XSPUtils {
|
||||
var prefs = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
|
||||
|
||||
fun getBoolean(key: String, defValue: Boolean): Boolean {
|
||||
|
||||
if (prefs.hasFileChanged()) {
|
||||
prefs.reload()
|
||||
}
|
||||
|
||||
return prefs.getBoolean(key, defValue)
|
||||
|
||||
}
|
||||
fun getInt(key: String, defValue: Int): Int {
|
||||
if (prefs.hasFileChanged()) {
|
||||
prefs.reload()
|
||||
}
|
||||
return prefs.getInt(key, defValue)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user