pull/1652/head
kunfei 3 years ago
parent b756f407b2
commit 20efb228f7
  1. 5
      app/src/main/java/io/legado/app/ui/font/FontAdapter.kt

@ -15,8 +15,9 @@ import java.net.URLDecoder
class FontAdapter(context: Context, curFilePath: String, val callBack: CallBack) :
RecyclerAdapter<FileDoc, ItemFontBinding>(context) {
private val curName = URLDecoder.decode(curFilePath, "utf-8")
.substringAfterLast(File.separator)
private val curName = kotlin.runCatching {
URLDecoder.decode(curFilePath, "utf-8")
}.getOrNull()?.substringAfterLast(File.separator)
override fun getViewBinding(parent: ViewGroup): ItemFontBinding {
return ItemFontBinding.inflate(inflater, parent, false)

Loading…
Cancel
Save