From b79fdf6a85602ca3659541d7d3efee646228477c Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 6 Aug 2019 18:55:38 +0200 Subject: [PATCH] Fix theme not well defined at runtime after configurationChange --- .../java/im/vector/riotx/core/platform/VectorBaseActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt index e9c60942b8..6145d5a76c 100644 --- a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt @@ -119,6 +119,8 @@ abstract class VectorBaseActivity : BaseMvRxActivity(), HasScreenInjector { injectWith(screenComponent) } Timber.v("Injecting dependencies into ${javaClass.simpleName} took $timeForInjection ms") + ThemeUtils.setActivityTheme(this, getOtherThemes()) + super.onCreate(savedInstanceState) viewModelFactory = screenComponent.viewModelFactory() configurationViewModel = ViewModelProviders.of(this, viewModelFactory).get(ConfigurationViewModel::class.java) @@ -135,8 +137,6 @@ abstract class VectorBaseActivity : BaseMvRxActivity(), HasScreenInjector { // Shake detector - ThemeUtils.setActivityTheme(this, getOtherThemes()) - doBeforeSetContentView() if (getLayoutRes() != -1) {