Fix crash when opening the MangaController from... (#5419)

...the browse search
null safe cast to TextView because when searching for manga in a source,
the toolbar has no children and
find() returns null.
pull/5433/head
jmir1 3 years ago committed by GitHub
parent ab73e98075
commit ac6b4235b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -296,7 +296,7 @@ class MangaController :
val scrolledList = binding.fullRecycler ?: binding.infoRecycler!!
if (toolbarTextView == null) {
toolbarTextView = (activity as? MainActivity)?.binding?.toolbar?.children
?.find { it is TextView } as TextView
?.find { it is TextView } as? TextView
}
toolbarTextView?.alpha = when {
// Specific alpha provided

Loading…
Cancel
Save