Merge branch 'gedoor:master' into master
This commit is contained in:
@@ -216,10 +216,14 @@ object Backup {
|
|||||||
coroutineContext.ensureActive()
|
coroutineContext.ensureActive()
|
||||||
withContext(IO) {
|
withContext(IO) {
|
||||||
if (list.isNotEmpty()) {
|
if (list.isNotEmpty()) {
|
||||||
|
AppLog.put("阅读备份 $fileName 列表大小 ${list.size}")
|
||||||
val file = FileUtils.createFileIfNotExist(path + File.separator + fileName)
|
val file = FileUtils.createFileIfNotExist(path + File.separator + fileName)
|
||||||
file.outputStream().buffered().use {
|
file.outputStream().buffered().use {
|
||||||
GSON.writeToOutputStream(it, list)
|
GSON.writeToOutputStream(it, list)
|
||||||
}
|
}
|
||||||
|
AppLog.put("阅读备份 $fileName 写入大小 ${file.length()}")
|
||||||
|
} else {
|
||||||
|
AppLog.put("阅读备份 $fileName 列表为空")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -446,7 +446,10 @@ class TextChapterLayout(
|
|||||||
val textLine = TextLine(isTitle = isTitle)
|
val textLine = TextLine(isTitle = isTitle)
|
||||||
if (durY + textHeight > visibleHeight) {
|
if (durY + textHeight > visibleHeight) {
|
||||||
val textPage = pendingTextPage
|
val textPage = pendingTextPage
|
||||||
textPage.height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
||||||
|
if (textPage.height < height) {
|
||||||
|
textPage.height = height
|
||||||
|
}
|
||||||
if (doublePage && absStartX < viewWidth / 2) {
|
if (doublePage && absStartX < viewWidth / 2) {
|
||||||
//当前页面左列结束
|
//当前页面左列结束
|
||||||
textPage.leftLineSize = textPage.lineSize
|
textPage.leftLineSize = textPage.lineSize
|
||||||
@@ -528,8 +531,9 @@ class TextChapterLayout(
|
|||||||
val textPage = pendingTextPage
|
val textPage = pendingTextPage
|
||||||
textPage.addLine(textLine)
|
textPage.addLine(textLine)
|
||||||
durY += textHeight * lineSpacingExtra
|
durY += textHeight * lineSpacingExtra
|
||||||
if (textPage.height < durY) {
|
val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
||||||
textPage.height = durY
|
if (textPage.height < height) {
|
||||||
|
textPage.height = height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
durY += textHeight * paragraphSpacing / 10f
|
durY += textHeight * paragraphSpacing / 10f
|
||||||
|
|||||||
Reference in New Issue
Block a user