Fix color when search opened with AMOLED mode

This commit is contained in:
Zakhar Timoshenko
2021-09-12 17:41:36 +03:00
committed by Koitharu
parent cd8e256364
commit 07e0ae884c

View File

@@ -345,7 +345,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(),
binding.drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
drawerToggle.isDrawerIndicatorEnabled = false
// Avoiding shadows on the sides if the color is transparent, so we make the AppBarLayout white/grey/black
if (get<AppSettings>().isAmoledTheme) {
if (get<AppSettings>().isAmoledTheme && get<AppSettings>().theme == AppCompatDelegate.MODE_NIGHT_YES) {
binding.toolbar.setBackgroundColor(Color.BLACK)
} else {
binding.appbar.setBackgroundColor(ContextCompat.getColor(this, R.color.color_surface))