mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
Merge pull request #3815 from yoguut/master
hotfix: import/export FormatList crash on init
This commit is contained in:
commit
1bc446f592
@ -24,12 +24,12 @@ class BackupRestoreSettings : BasePreferenceFragment() {
|
|||||||
private val backupDateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH:mm:ss")
|
private val backupDateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH:mm:ss")
|
||||||
private var backupFile = BackupFile()
|
private var backupFile = BackupFile()
|
||||||
private var importFormat: ImportFormat = ImportFormat.NEWPIPE
|
private var importFormat: ImportFormat = ImportFormat.NEWPIPE
|
||||||
private val importFormatList = listOf(
|
private val importFormatList get() = listOf(
|
||||||
ImportFormat.NEWPIPE,
|
ImportFormat.NEWPIPE,
|
||||||
ImportFormat.FREETUBE,
|
ImportFormat.FREETUBE,
|
||||||
ImportFormat.YOUTUBECSV
|
ImportFormat.YOUTUBECSV
|
||||||
).map { getString(it.value) }
|
).map { getString(it.value) }
|
||||||
private val exportFormatList = listOf(
|
private val exportFormatList get() = listOf(
|
||||||
ImportFormat.NEWPIPE,
|
ImportFormat.NEWPIPE,
|
||||||
ImportFormat.FREETUBE
|
ImportFormat.FREETUBE
|
||||||
).map { getString(it.value) }
|
).map { getString(it.value) }
|
||||||
@ -110,10 +110,6 @@ class BackupRestoreSettings : BasePreferenceFragment() {
|
|||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun exportFormatList(): List<String> {
|
|
||||||
return listOf(getString(R.string.import_format_newpipe), getString(R.string.import_format_freetube))
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
setPreferencesFromResource(R.xml.import_export_settings, rootKey)
|
setPreferencesFromResource(R.xml.import_export_settings, rootKey)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user