Fix theme on release build (#332)

This commit is contained in:
Mikołaj Pich 2019-04-30 11:16:23 +02:00 committed by Rafał Borcz
parent df0a1e59cc
commit b032c459d1

View File

@ -27,7 +27,7 @@ class ThemeManager @Inject constructor(private val preferencesRepository: Prefer
private fun isThemeApplicable(activity: AppCompatActivity): Boolean {
return activity.packageManager.getPackageInfo(activity.packageName, GET_ACTIVITIES)
.activities.singleOrNull { it.name == activity.localClassName }?.theme
.activities.singleOrNull { it.name == activity::class.java.canonicalName }?.theme
.let { it == R.style.WulkanowyTheme_Black || it == R.style.WulkanowyTheme_NoActionBar }
}
}