mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Last minute change, use normalized app name as default folder name
Fixes GH-27
This commit is contained in:
parent
9a4149fb88
commit
ceb4ebab05
5 changed files with 8 additions and 7 deletions
|
@ -10,6 +10,7 @@
|
|||
## Changes
|
||||
- Added splash to reader (in case it being opened from shortcut)
|
||||
- Increased long strip split height
|
||||
- Use normalized app name by default as folder name
|
||||
|
||||
## Fixes
|
||||
- Fixed cutout support being broken
|
||||
|
|
|
@ -69,7 +69,7 @@ class PreferencesHelper(val context: Context, val preferenceStore: PreferenceSto
|
|||
private val defaultDownloadsDir = Uri.fromFile(
|
||||
File(
|
||||
Environment.getExternalStorageDirectory().absolutePath + File.separator +
|
||||
context.getString(R.string.app_name),
|
||||
context.getString(R.string.app_normalized_name),
|
||||
"downloads",
|
||||
),
|
||||
)
|
||||
|
@ -77,7 +77,7 @@ class PreferencesHelper(val context: Context, val preferenceStore: PreferenceSto
|
|||
private val defaultBackupDir = Uri.fromFile(
|
||||
File(
|
||||
Environment.getExternalStorageDirectory().absolutePath + File.separator +
|
||||
context.getString(R.string.app_name),
|
||||
context.getString(R.string.app_normalized_name),
|
||||
"backup",
|
||||
),
|
||||
)
|
||||
|
|
|
@ -860,14 +860,14 @@ class MangaDetailsPresenter(
|
|||
val directory = if (preferences.folderPerManga().get()) {
|
||||
val baseDir = Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + Environment.DIRECTORY_PICTURES +
|
||||
File.separator + preferences.context.getString(R.string.app_name)
|
||||
File.separator + preferences.context.getString(R.string.app_normalized_name)
|
||||
|
||||
File(baseDir + File.separator + DiskUtil.buildValidFilename(manga.title))
|
||||
} else {
|
||||
File(
|
||||
Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + Environment.DIRECTORY_PICTURES +
|
||||
File.separator + preferences.context.getString(R.string.app_name),
|
||||
File.separator + preferences.context.getString(R.string.app_normalized_name),
|
||||
)
|
||||
}
|
||||
val file = saveCover(directory)
|
||||
|
|
|
@ -816,7 +816,7 @@ class ReaderViewModel(
|
|||
// Pictures directory.
|
||||
val baseDir = Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + Environment.DIRECTORY_PICTURES +
|
||||
File.separator + context.getString(R.string.app_name)
|
||||
File.separator + context.getString(R.string.app_normalized_name)
|
||||
val destDir = if (preferences.folderPerManga().get()) {
|
||||
File(baseDir + File.separator + DiskUtil.buildValidFilename(manga.title))
|
||||
} else {
|
||||
|
@ -850,7 +850,7 @@ class ReaderViewModel(
|
|||
// Pictures directory.
|
||||
val baseDir = Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + Environment.DIRECTORY_PICTURES +
|
||||
File.separator + context.getString(R.string.app_name)
|
||||
File.separator + context.getString(R.string.app_normalized_name)
|
||||
val destDir = if (preferences.folderPerManga().get()) {
|
||||
File(baseDir + File.separator + DiskUtil.buildValidFilename(manga.title))
|
||||
} else {
|
||||
|
|
|
@ -205,7 +205,7 @@ class SettingsDownloadController : SettingsController() {
|
|||
|
||||
private fun getExternalDirs(): List<File> {
|
||||
val defaultDir = Environment.getExternalStorageDirectory().absolutePath +
|
||||
File.separator + activity.resources?.getString(R.string.app_name) +
|
||||
File.separator + activity.resources?.getString(R.string.app_normalized_name) +
|
||||
File.separator + "downloads"
|
||||
|
||||
return mutableListOf(File(defaultDir)) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue