Remove activity mixin class

This commit is contained in:
inorichi
2017-05-24 14:00:26 +02:00
parent 73d1a1a05e
commit c7686323b7
6 changed files with 21 additions and 123 deletions
@@ -99,7 +99,11 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
return
}
setupToolbar(toolbar)
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
toolbar.setNavigationOnClickListener {
onBackPressed()
}
initializeSettings()
initializeBottomMenu()
@@ -131,6 +135,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
}
override fun onDestroy() {
toolbar.setNavigationOnClickListener(null)
subscriptions.unsubscribe()
viewer = null
super.onDestroy()
@@ -256,7 +261,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
// Invert the seekbar for the right to left reader
page_seekbar.rotation = 180f
}
setToolbarTitle(manga.title)
supportActionBar?.title = manga.title
please_wait.visibility = View.VISIBLE
please_wait.startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in_long))
}
@@ -288,10 +293,10 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
page_seekbar.max = numPages - 1
page_seekbar.progress = currentPage
setToolbarSubtitle(if (chapter.isRecognizedNumber)
supportActionBar?.subtitle = if (chapter.isRecognizedNumber)
getString(R.string.chapter_subtitle, decimalFormat.format(chapter.chapter_number.toDouble()))
else
chapter.name)
chapter.name
}
fun onAppendChapter(chapter: ReaderChapter) {