From a96303e53fb5e18b8178faee81205ee1c3496122 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 12 Nov 2019 14:59:27 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/entities/BookChapter.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt index b88151e5d..8fa130d31 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt @@ -54,5 +54,8 @@ data class BookChapter( variable = GSON.toJson(variableMap) } + fun getVariableValue(book: Book, key: String): String? { + return variableMap?.get(key) ?: book.variableMap?.get(key) + } }