mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-08 06:46:11 +00:00
20 lines
736 B
Kotlin
20 lines
736 B
Kotlin
package com.bitchat.android.onboarding
|
|
|
|
import android.content.Context
|
|
import com.bitchat.android.storage.StorageDefinitions
|
|
import com.bitchat.android.storage.StorageModule
|
|
|
|
object BackgroundLocationPreferenceManager {
|
|
private const val KEY_BACKGROUND_LOCATION_SKIP = "background_location_skipped"
|
|
|
|
fun setSkipped(context: Context, skipped: Boolean) {
|
|
val storage = StorageModule.repository(context, StorageDefinitions.AppSettings)
|
|
storage.putBoolean(KEY_BACKGROUND_LOCATION_SKIP, skipped)
|
|
}
|
|
|
|
fun isSkipped(context: Context): Boolean {
|
|
val storage = StorageModule.repository(context, StorageDefinitions.AppSettings)
|
|
return storage.getBoolean(KEY_BACKGROUND_LOCATION_SKIP, false)
|
|
}
|
|
}
|