Upgrade to nucleus 3

This commit is contained in:
len
2016-04-22 13:50:51 +02:00
parent 50ae08ed8d
commit 9f0da3f1d6
13 changed files with 66 additions and 75 deletions
@@ -103,21 +103,17 @@ class RecentChaptersFragment : BaseRxFragment<RecentChaptersPresenter>(), Flexib
/**
* Open chapter in reader
*
* @param chapter selected chapter
*/
private fun openChapter(chapter: MangaChapter) {
// Start reader event
presenter.onOpenChapter(chapter)
//Start reader intent
val intent = ReaderActivity.newIntent(activity)
val intent = ReaderActivity.newIntent(activity, chapter.manga, chapter.chapter)
startActivity(intent)
}
/**
* Populate adapter with chapters
*
* @param chapters list of chapters
*/
fun onNextMangaChapters(chapters: List<Any>) {
@@ -10,9 +10,7 @@ import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.source.SourceManager
import eu.kanade.tachiyomi.event.DownloadChaptersEvent
import eu.kanade.tachiyomi.event.ReaderEvent
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
import eu.kanade.tachiyomi.util.SharedData
import rx.Observable
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
@@ -251,14 +249,6 @@ class RecentChaptersPresenter : BasePresenter<RecentChaptersFragment>() {
return cal.time
}
/**
* Open chapter in reader
* @param item chapter that is opened
*/
fun onOpenChapter(item: MangaChapter) {
SharedData.put(ReaderEvent(item.manga, item.chapter))
}
/**
* Download selected chapter
* @param selectedChapter chapter that is selected