Fix wallpaper theme

pull/3599/head
Alex Baker 7 months ago
parent 6a99e75115
commit ad7141a1c9

@ -110,15 +110,11 @@ class MainActivity : AppCompatActivity() {
private var actionMode: ActionMode? = null private var actionMode: ActionMode? = null
private var isReady = false private var isReady = false
/** @see android.app.Activity.onCreate
*/
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen = installSplashScreen()
splashScreen.setKeepOnScreenCondition { !isReady }
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
theme.themeBase.set(this) theme.themeBase.set(this)
val splashScreen = installSplashScreen()
splashScreen.setKeepOnScreenCondition { !isReady }
currentNightMode = nightMode currentNightMode = nightMode
currentPro = inventory.hasPro currentPro = inventory.hasPro

@ -1,17 +1,12 @@
package org.tasks.themes package org.tasks.themes
import android.app.Activity import android.app.Activity
import android.content.Context
import android.view.LayoutInflater
import javax.inject.Inject import javax.inject.Inject
class Theme @Inject constructor( class Theme @Inject constructor(
val themeBase: ThemeBase, val themeBase: ThemeBase,
val themeColor: ThemeColor, val themeColor: ThemeColor,
) { ) {
fun getLayoutInflater(context: Context) =
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
fun applyThemeAndStatusBarColor(activity: Activity) { fun applyThemeAndStatusBarColor(activity: Activity) {
applyTheme(activity) applyTheme(activity)
themeColor.applyToNavigationBar(activity) themeColor.applyToNavigationBar(activity)

@ -65,7 +65,6 @@
<item name="windowSplashScreenBackground">@color/window_background</item> <item name="windowSplashScreenBackground">@color/window_background</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_blue</item> <item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_blue</item>
<item name="windowSplashScreenAnimationDuration">300</item> <item name="windowSplashScreenAnimationDuration">300</item>
<item name="postSplashScreenTheme">@style/Tasks</item>
</style> </style>
</resources> </resources>
Loading…
Cancel
Save