Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 800dd971 authored by tibbi's avatar tibbi
Browse files

show Shared theme and hide Apply To All button at customization in some cases

parent 876f09de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.17.24'
        propVersionName = '3.18.0'
        kotlin_version = '1.2.31'
        support_libs = '27.1.0'
    }
+9 −7
Original line number Diff line number Diff line
@@ -44,21 +44,21 @@ class CustomizationActivity : BaseSimpleActivity() {
            put(THEME_DARK_RED, MyTheme(R.string.dark_red, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.theme_dark_red_primary_color))
            put(THEME_BLACK_WHITE, MyTheme(R.string.black_white, android.R.color.white, android.R.color.black, android.R.color.black))
            put(THEME_CUSTOM, MyTheme(R.string.custom, 0, 0, 0))

            if (baseConfig.wasSharedThemeEverActivated) {
                put(THEME_SHARED, MyTheme(R.string.shared, 0, 0, 0))
            }
        }

        if (!isThankYouInstalled()) {
            baseConfig.isUsingSharedTheme = false
        }

        if (baseConfig.wasSharedThemeEverActivated) {
        getSharedTheme {
            if (it != null) {
                storedSharedTheme = it
                baseConfig.wasSharedThemeEverActivated = true
                apply_to_all_holder.beGone()
                predefinedThemes[THEME_SHARED] = MyTheme(R.string.shared, it.textColor, it.backgroundColor, it.primaryColor)
            }
        }

        supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross)
        updateTextColors(customization_holder)
        initColorVariables()
@@ -329,7 +329,9 @@ class CustomizationActivity : BaseSimpleActivity() {
                    sendBroadcast(this)
                }

                predefinedThemes.put(THEME_SHARED, MyTheme(R.string.shared, 0, 0, 0))
                if (!predefinedThemes.containsKey(THEME_SHARED)) {
                    predefinedThemes[THEME_SHARED] = MyTheme(R.string.shared, 0, 0, 0)
                }
                baseConfig.wasSharedThemeEverActivated = true
                apply_to_all_holder.beGone()
                updateColorTheme(THEME_SHARED)