|
|
@ -136,7 +136,7 @@ object ChapterProvider { |
|
|
|
while (matcher.find()) { |
|
|
|
while (matcher.find()) { |
|
|
|
matcher.group(1)?.let { src -> |
|
|
|
matcher.group(1)?.let { src -> |
|
|
|
srcList.add(src) |
|
|
|
srcList.add(src) |
|
|
|
ImageProvider.getImage(book, bookChapter.index, src, ReadBook.bookSource) |
|
|
|
ImageProvider.getImage(book, src, ReadBook.bookSource) |
|
|
|
matcher.appendReplacement(sb, srcReplaceChar) |
|
|
|
matcher.appendReplacement(sb, srcReplaceChar) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -163,7 +163,7 @@ object ChapterProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
durY = setTypeImage( |
|
|
|
durY = setTypeImage( |
|
|
|
book, bookChapter, matcher.group(1)!!, |
|
|
|
book, matcher.group(1)!!, |
|
|
|
absStartX, durY, textPages, book.getImageStyle() |
|
|
|
absStartX, durY, textPages, book.getImageStyle() |
|
|
|
) |
|
|
|
) |
|
|
|
start = matcher.end() |
|
|
|
start = matcher.end() |
|
|
@ -202,7 +202,6 @@ object ChapterProvider { |
|
|
|
|
|
|
|
|
|
|
|
private fun setTypeImage( |
|
|
|
private fun setTypeImage( |
|
|
|
book: Book, |
|
|
|
book: Book, |
|
|
|
chapter: BookChapter, |
|
|
|
|
|
|
|
src: String, |
|
|
|
src: String, |
|
|
|
x: Int, |
|
|
|
x: Int, |
|
|
|
y: Float, |
|
|
|
y: Float, |
|
|
@ -210,7 +209,7 @@ object ChapterProvider { |
|
|
|
imageStyle: String?, |
|
|
|
imageStyle: String?, |
|
|
|
): Float { |
|
|
|
): Float { |
|
|
|
var durY = y |
|
|
|
var durY = y |
|
|
|
ImageProvider.getImage(book, chapter.index, src, ReadBook.bookSource)?.let { |
|
|
|
ImageProvider.getImage(book, src, ReadBook.bookSource)?.let { |
|
|
|
if (durY > visibleHeight) { |
|
|
|
if (durY > visibleHeight) { |
|
|
|
textPages.last().height = durY |
|
|
|
textPages.last().height = durY |
|
|
|
textPages.add(TextPage()) |
|
|
|
textPages.add(TextPage()) |
|
|
|