diff --git a/app/src/main/java/org/koitharu/kotatsu/base/ui/BaseActivity.kt b/app/src/main/java/org/koitharu/kotatsu/base/ui/BaseActivity.kt index d032ec3e9..ec2fab14e 100644 --- a/app/src/main/java/org/koitharu/kotatsu/base/ui/BaseActivity.kt +++ b/app/src/main/java/org/koitharu/kotatsu/base/ui/BaseActivity.kt @@ -59,12 +59,12 @@ abstract class BaseActivity : AppCompatActivity(), OnApplyWindo this.binding = binding super.setContentView(binding.root) (binding.root.findViewById(R.id.toolbar) as? Toolbar)?.let(this::setSupportActionBar) - val params = (binding.root.findViewById(R.id.toolbar) as? Toolbar)?.layoutParams as AppBarLayout.LayoutParams + val params = (binding.root.findViewById(R.id.toolbar) as? Toolbar)?.layoutParams as? AppBarLayout.LayoutParams ViewCompat.setOnApplyWindowInsetsListener(binding.root, this) if (get().isToolbarHideWhenScrolling) { - params.scrollFlags = SCROLL_FLAG_SCROLL or SCROLL_FLAG_ENTER_ALWAYS + params?.scrollFlags = SCROLL_FLAG_SCROLL or SCROLL_FLAG_ENTER_ALWAYS } else { - params.scrollFlags = SCROLL_FLAG_NO_SCROLL + params?.scrollFlags = SCROLL_FLAG_NO_SCROLL } }