From 8addb9a6875a0d9ba3c32bd3d7299f219a5995d1 Mon Sep 17 00:00:00 2001 From: atbest Date: Thu, 23 May 2019 00:50:27 -0400 Subject: [PATCH] Updated Chapter class --- app/src/main/java/io/legado/app/data/entities/Chapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/Chapter.kt b/app/src/main/java/io/legado/app/data/entities/Chapter.kt index b5ba5bf93..f69bb4ac0 100644 --- a/app/src/main/java/io/legado/app/data/entities/Chapter.kt +++ b/app/src/main/java/io/legado/app/data/entities/Chapter.kt @@ -2,6 +2,7 @@ package io.legado.app.data.entities import android.os.Parcelable import androidx.room.Entity +import androidx.room.ForeignKey import androidx.room.Index import androidx.room.PrimaryKey import kotlinx.android.parcel.Parcelize @@ -9,9 +10,8 @@ import kotlinx.android.parcel.Parcelize @Parcelize @Entity(tableName = "chapters", - indices = [(Index(value = ["url"]))]) + indices = [(Index(value = ["feedId", "feedLink"], unique = true))]) data class Chapter(@PrimaryKey - var url: String = "", var name: String = "", var bookUrl: String = "", var index: Int = 0,