mirror of https://git.sr.ht/~oppen/ariane
29 lines
1.0 KiB
Kotlin
29 lines
1.0 KiB
Kotlin
package oppen.ariane
|
|
|
|
import android.app.Application
|
|
import androidx.appcompat.app.AppCompatDelegate
|
|
import androidx.preference.PreferenceManager
|
|
|
|
class Ariane: Application() {
|
|
|
|
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)
|
|
}
|
|
|
|
}
|
|
|
|
companion object{
|
|
const val DEFAULT_HOME_CAPSULE = "gemini://gemini.circumlunar.space/~oppen/index.gmi"
|
|
const val GEMINI_USER_SEARCH_BASE = "gemini://gus.guru/search?"
|
|
const val GEMINI_BACKLINK_BASE = "gemini://gus.guru/backlinks?"
|
|
|
|
const val FEATURE_CLIENT_CERTS = true
|
|
}
|
|
} |