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

Commit c4b6502d authored by tibbi's avatar tibbi
Browse files

add null checks to getSharedTheme

parent a0287eb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.1.0'
        propVersionName = '3.1.1'
        kotlin_version = '1.2.0'
        support_libs = '27.0.2'
    }
+10 −6
Original line number Diff line number Diff line
@@ -17,17 +17,20 @@ class SharedThemeReceiver : BroadcastReceiver() {
                    wasSharedThemeEverActivated = true

                    context.getSharedTheme {
                        textColor = it!!.textColor
                        if (it != null) {
                            textColor = it.textColor
                            backgroundColor = it.backgroundColor
                            primaryColor = it.primaryColor
                        }
                    }
                }
            }
        } else if (intent.action == MyContentProvider.SHARED_THEME_UPDATED) {
            context.baseConfig.apply {
                if (isUsingSharedTheme) {
                    context.getSharedTheme {
                        textColor = it!!.textColor
                        if (it != null) {
                            textColor = it.textColor
                            backgroundColor = it.backgroundColor
                            primaryColor = it.primaryColor
                        }
@@ -36,3 +39,4 @@ class SharedThemeReceiver : BroadcastReceiver() {
            }
        }
    }
}