Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
Enable background image and adaptive theming by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Oct 21, 2021
1 parent d45ec6c commit 2b48b71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/cyb3rko/cavedroid/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ object Utils {
}

internal fun getBackgroundDrawableId(resources: Resources, mySPR: SharedPreferences): Int {
return when (mySPR.getString(BACKGROUND_IMAGE, "-1")!!.toInt()) {
return when (mySPR.getString(BACKGROUND_IMAGE, "0")!!.toInt()) {
0 -> {
if (isNightModeActive(resources)) {
R.drawable.background_forest2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class PreferenceFragment : PreferenceFragmentCompat() {
crashlyticsCollectionSwitch = findPreference(CRASHLYTICS_COLLECTION)!!

nightModeList.value = mySPR.getString(NIGHTMODE, AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM.toString())
backgroundImageList.value = mySPR.getString(BACKGROUND_IMAGE, "-1")
adaptiveThemingSwitch.isChecked = mySPR.getBoolean(ADAPTIVE_THEMING, false)
adaptiveThemingSwitch.isEnabled = mySPR.getBoolean(BACKGROUND_SET, false)
backgroundImageList.value = mySPR.getString(BACKGROUND_IMAGE, "0")
adaptiveThemingSwitch.isChecked = mySPR.getBoolean(ADAPTIVE_THEMING, true)
adaptiveThemingSwitch.isEnabled = mySPR.getBoolean(BACKGROUND_SET, true)
avatarTypeList.value = mySPR.getString(AVATAR_TYPE, "avatar")
showAnnouncementSwitch.isChecked = mySPR.getBoolean(SHOW_ANNOUNCEMENTS, true)
announcementImageSwitch.isChecked = mySPR.getBoolean(ANNOUNCEMENT_IMAGE, true)
Expand Down

0 comments on commit 2b48b71

Please sign in to comment.