From 3b1635130843d8f64d65d0bc79af6ee8d31e17f9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 19 Mar 2021 13:36:24 +0100 Subject: [PATCH] Fix bad theme change for the MainActivity --- CHANGES.md | 2 +- vector/src/main/java/im/vector/app/features/MainActivity.kt | 3 +++ .../im/vector/app/features/themes/ActivityOtherThemes.kt | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e559879648..c3fde19bc4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ Improvements 🙌: - Display the room shield in all room setting screens Bugfix 🐛: - - + - Fix bad theme change for the MainActivity Translations 🗣: - diff --git a/vector/src/main/java/im/vector/app/features/MainActivity.kt b/vector/src/main/java/im/vector/app/features/MainActivity.kt index 143506d4df..e6c5abe20c 100644 --- a/vector/src/main/java/im/vector/app/features/MainActivity.kt +++ b/vector/src/main/java/im/vector/app/features/MainActivity.kt @@ -43,6 +43,7 @@ import im.vector.app.features.popup.PopupAlertManager import im.vector.app.features.settings.VectorPreferences import im.vector.app.features.signout.hard.SignedOutActivity import im.vector.app.features.signout.soft.SoftLogoutActivity +import im.vector.app.features.themes.ActivityOtherThemes import im.vector.app.features.ui.UiStateRepository import kotlinx.parcelize.Parcelize import kotlinx.coroutines.Dispatchers @@ -83,6 +84,8 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity override fun getBinding() = ActivityMainBinding.inflate(layoutInflater) + override fun getOtherThemes() = ActivityOtherThemes.Launcher + private lateinit var args: MainActivityArgs @Inject lateinit var notificationDrawerManager: NotificationDrawerManager diff --git a/vector/src/main/java/im/vector/app/features/themes/ActivityOtherThemes.kt b/vector/src/main/java/im/vector/app/features/themes/ActivityOtherThemes.kt index 847caeab4c..a1065ed10b 100644 --- a/vector/src/main/java/im/vector/app/features/themes/ActivityOtherThemes.kt +++ b/vector/src/main/java/im/vector/app/features/themes/ActivityOtherThemes.kt @@ -31,6 +31,11 @@ sealed class ActivityOtherThemes(@StyleRes val dark: Int, R.style.AppTheme_Black ) + object Launcher : ActivityOtherThemes( + R.style.AppTheme_Launcher, + R.style.AppTheme_Launcher + ) + object AttachmentsPreview : ActivityOtherThemes( R.style.AppTheme_AttachmentsPreview, R.style.AppTheme_AttachmentsPreview