diff --git a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt index 0f92b5eae..0b537e8fd 100644 --- a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt +++ b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt @@ -66,7 +66,15 @@ data class SearchBook( @Ignore @IgnoredOnParcel - val origins: LinkedHashSet? = null + var origins: LinkedHashSet? = null + private set + + fun addOrigin(origin: String) { + if (origins == null) { + origins = linkedSetOf() + } + origins?.add(origin) + } fun toBook(): Book { return Book(