ariane/app/src/main/java/oppen/ariane/Ariane.kt

29 lines
1.0 KiB
Kotlin
Raw Normal View History

package oppen.ariane
2020-08-15 14:52:27 +00:00
import android.app.Application
2020-11-15 19:43:22 +00:00
import androidx.appcompat.app.AppCompatDelegate
import androidx.preference.PreferenceManager
2020-08-15 14:52:27 +00:00
class Ariane: Application() {
2020-08-20 13:55:59 +00:00
2020-11-15 19:43:22 +00:00
override fun onCreate() {
super.onCreate()
val prefs = PreferenceManager.getDefaultSharedPreferences(this)
when {
prefs.getBoolean("theme_Light", false) -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
prefs.getBoolean("theme_Dark", false) -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
prefs.getBoolean("theme_FollowSystem", true) -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
}
}
2020-08-20 13:55:59 +00:00
companion object{
2020-11-03 23:22:03 +00:00
const val DEFAULT_HOME_CAPSULE = "gemini://gemini.circumlunar.space/~oppen/index.gmi"
2020-08-25 11:57:35 +00:00
const val GEMINI_USER_SEARCH_BASE = "gemini://gus.guru/search?"
const val GEMINI_BACKLINK_BASE = "gemini://gus.guru/backlinks?"
2020-11-15 20:54:18 +00:00
const val FEATURE_CLIENT_CERTS = true
2020-08-20 13:55:59 +00:00
}
2020-08-15 14:52:27 +00:00
}