From a012bf6f4c1a216d7cceddb33c9bfa49c9bd26ef Mon Sep 17 00:00:00 2001 From: Paul Woitaschek Date: Sat, 5 Jan 2019 22:17:40 +0100 Subject: [PATCH] Use the BookChangeHandler when navigating from the category to the playing screen. --- .../features/bookCategory/BookCategoryController.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/ph1b/audiobook/features/bookCategory/BookCategoryController.kt b/app/src/main/java/de/ph1b/audiobook/features/bookCategory/BookCategoryController.kt index ca4ce14599..8252c0b043 100644 --- a/app/src/main/java/de/ph1b/audiobook/features/bookCategory/BookCategoryController.kt +++ b/app/src/main/java/de/ph1b/audiobook/features/bookCategory/BookCategoryController.kt @@ -12,6 +12,7 @@ import de.ph1b.audiobook.injection.appComponent import de.ph1b.audiobook.misc.conductor.asTransaction import de.ph1b.audiobook.misc.conductor.popOrBack import de.ph1b.audiobook.misc.tint +import de.ph1b.audiobook.uitools.BookChangeHandler import kotlinx.android.synthetic.main.book_category.* import javax.inject.Inject @@ -39,10 +40,13 @@ class BookCategoryController(bundle: Bundle) : BaseController(bundle) { toolbar.tint() toolbar.setNavigationOnClickListener { popOrBack() } - val adapter = BookCategoryAdapter() { book, clickType -> + val adapter = BookCategoryAdapter { book, clickType -> when (clickType) { BookOverviewClick.REGULAR -> { - router.replaceTopController(BookPlayController(book.id).asTransaction()) + val changeHandler = BookChangeHandler().apply { + transitionName = book.coverTransitionName + } + router.replaceTopController(BookPlayController(book.id).asTransaction(changeHandler, changeHandler)) } BookOverviewClick.MENU -> { }