浏览代码

Fix a few crashes

len 8 年之前
父节点
当前提交
81887000a8

+ 1 - 1
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

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersPresenter.kt

@@ -62,7 +62,7 @@ class ChaptersPresenter : BasePresenter<ChaptersFragment>() {
     /**
      * List of chapters of the manga. It's always unfiltered and unsorted.
      */
-    lateinit var chapters: List<ChapterModel>
+    var chapters: List<ChapterModel> = emptyList()
         private set
 
     /**

+ 1 - 1
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