pull/363/head
gedoor 4 years ago
parent 40f5205802
commit f92de8797b
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt

@ -316,10 +316,8 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack {
val config: ReadBookConfig.Config = GSON.fromJsonObject(configFile.readText())!! val config: ReadBookConfig.Config = GSON.fromJsonObject(configFile.readText())!!
if (config.textFont.isNotEmpty()) { if (config.textFont.isNotEmpty()) {
val fontName = FileUtils.getName(config.textFont) val fontName = FileUtils.getName(config.textFont)
val file = FileUtils.createFileIfNotExist( val file = File(
requireContext().externalFilesDir, FileUtils.getPath(requireContext().externalFilesDir, "font", fontName)
"font",
fontName
) )
FileUtils.getFile(configDir, fontName).copyTo(file) FileUtils.getFile(configDir, fontName).copyTo(file)
config.textFont = file.absolutePath config.textFont = file.absolutePath

Loading…
Cancel
Save