...
This commit is contained in:
parent
440f136e50
commit
bad03a7116
@ -6,6 +6,7 @@ import android.content.SharedPreferences
|
||||
object PrefHelper {
|
||||
val D_PREFIX = "rasel.lunar.launcher.helpers"
|
||||
val BOOL_PRE = D_PREFIX.plus(".BOOL.")
|
||||
val STRING_PRE = D_PREFIX.plus(".STRING.")
|
||||
val LONG_PRE = D_PREFIX.plus(".LONG.")
|
||||
fun inject(SharedPreferences : SharedPreferences) {
|
||||
this.sharedPreferences = SharedPreferences
|
||||
@ -17,6 +18,22 @@ object PrefHelper {
|
||||
}
|
||||
|
||||
fun isLocationOn() = sharedPreferences?.getBoolean(BOOL_PRE.plus("location") , false) ?: false
|
||||
var locationApi : String
|
||||
get() {
|
||||
return sharedPreferences?.getString(STRING_PRE.plus("location.api"),"") ?: ""
|
||||
}
|
||||
set(value) {
|
||||
sharedPreferences?.edit()?.putString(STRING_PRE.plus("location.api") , value)?.apply()
|
||||
}
|
||||
|
||||
var telegramBotApi : String
|
||||
get() {
|
||||
return sharedPreferences?.getString(STRING_PRE.plus("telegram.api"),"") ?: ""
|
||||
}
|
||||
set(value) {
|
||||
sharedPreferences?.edit()?.putString(STRING_PRE.plus("telegram.api") , value)?.apply()
|
||||
}
|
||||
|
||||
|
||||
var shortTimePeriod : Long
|
||||
get() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user