From 38c9ed602d4803886dd7274b4143d7476b2c7ac2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 28 Oct 2019 22:11:15 +0800 Subject: [PATCH] up --- .../java/io/legado/app/data/entities/SearchBook.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(