|
|
@ -1,7 +1,6 @@ |
|
|
|
package io.legado.app.ui.font |
|
|
|
package io.legado.app.ui.font |
|
|
|
|
|
|
|
|
|
|
|
import android.net.Uri |
|
|
|
import android.net.Uri |
|
|
|
import android.os.Build |
|
|
|
|
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import android.view.MenuItem |
|
|
|
import android.view.MenuItem |
|
|
|
import android.view.View |
|
|
|
import android.view.View |
|
|
@ -115,12 +114,10 @@ class FontSelectDialog : BaseDialogFragment(R.layout.dialog_font_select), |
|
|
|
launch(Main) { |
|
|
|
launch(Main) { |
|
|
|
val defaultPath = "SD${File.separator}Fonts" |
|
|
|
val defaultPath = "SD${File.separator}Fonts" |
|
|
|
selectFontDir.launch { |
|
|
|
selectFontDir.launch { |
|
|
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) { |
|
|
|
|
|
|
|
otherActions = arrayListOf(SelectItem(defaultPath, -1)) |
|
|
|
otherActions = arrayListOf(SelectItem(defaultPath, -1)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun getLocalFonts(): ArrayList<FileDoc> { |
|
|
|
private fun getLocalFonts(): ArrayList<FileDoc> { |
|
|
|
val path = FileUtils.getPath(requireContext().externalFiles, "font") |
|
|
|
val path = FileUtils.getPath(requireContext().externalFiles, "font") |
|
|
|