Skip to content

Commit

Permalink
Use the BookChangeHandler when navigating from the category to the
Browse files Browse the repository at this point in the history
playing screen.
  • Loading branch information
PaulWoitaschek committed Jan 5, 2019
1 parent 1a17b93 commit a012bf6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 -> {
}
Expand Down

0 comments on commit a012bf6

Please sign in to comment.