From 81887000a88d16e4c2e313cb94ae4d4ba5df03ef Mon Sep 17 00:00:00 2001 From: len Date: Sun, 3 Jul 2016 21:04:09 +0200 Subject: [PATCH] Fix a few crashes --- .../java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterModel.kt | 2 +- .../eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapter.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterModel.kt index a3eed5ed6..7f878c7b3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterModel.kt @@ -11,7 +11,7 @@ class ChapterModel(c: Chapter) : Chapter by c { get() = download?.status ?: _status set(value) { _status = value } - var download: Download? = null + @Transient var download: Download? = null val isDownloaded: Boolean get() = status == Download.DOWNLOADED diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt index e8a50d08e..402f15623 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt @@ -62,7 +62,7 @@ class ChaptersPresenter : BasePresenter() { /** * List of chapters of the manga. It's always unfiltered and unsorted. */ - lateinit var chapters: List + var chapters: List = emptyList() private set /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapter.kt index 8c32ef2c5..c9060f3e8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapter.kt @@ -14,7 +14,7 @@ class RecentChapter(mc: MangaChapter) : Chapter by mc.chapter { get() = download?.status ?: _status set(value) { _status = value } - var download: Download? = null + @Transient var download: Download? = null val isDownloaded: Boolean get() = status == Download.DOWNLOADED