filter exportable extensions
This commit is contained in:
parent
7e51e067cd
commit
9358f86d43
2 changed files with 15 additions and 13 deletions
|
@ -72,7 +72,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
private var cursedCounter = 0
|
private var cursedCounter = 0
|
||||||
|
|
||||||
@OptIn(UnstableApi::class)
|
@OptIn(UnstableApi::class)
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n", "Recycle")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
ThemeManager(this).applyTheme()
|
ThemeManager(this).applyTheme()
|
||||||
|
@ -267,7 +267,9 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
selectedImpExp = Location.entries[i].name
|
selectedImpExp = Location.entries[i].name
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Import/Export Settings")
|
.setTitle("Import/Export Settings")
|
||||||
.setSingleChoiceItems(Location.entries.map { it.name }.toTypedArray(), 0) { dialog, which ->
|
.setSingleChoiceItems(Location.entries
|
||||||
|
.filter { it.exportable }
|
||||||
|
.map { it.name }.toTypedArray(), 0) { dialog, which ->
|
||||||
selectedImpExp = Location.entries[which].name
|
selectedImpExp = Location.entries[which].name
|
||||||
i = which
|
i = which
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,15 +8,15 @@ data class Pref(
|
||||||
val type: KClass<*>,
|
val type: KClass<*>,
|
||||||
val default: Any
|
val default: Any
|
||||||
)
|
)
|
||||||
enum class Location(val location: String) {
|
enum class Location(val location: String, val exportable: Boolean) {
|
||||||
General("ani.dantotsu.general"),
|
General("ani.dantotsu.general", true),
|
||||||
UI("ani.dantotsu.ui"),
|
UI("ani.dantotsu.ui", true),
|
||||||
Anime("ani.dantotsu.anime"),
|
Anime("ani.dantotsu.anime", true),
|
||||||
Manga("ani.dantotsu.manga"),
|
Manga("ani.dantotsu.manga", true),
|
||||||
Player("ani.dantotsu.player"),
|
Player("ani.dantotsu.player", true),
|
||||||
Reader("ani.dantotsu.reader"),
|
Reader("ani.dantotsu.reader", true),
|
||||||
NovelReader("ani.dantotsu.novelReader"),
|
NovelReader("ani.dantotsu.novelReader", true),
|
||||||
Irrelevant("ani.dantotsu.irrelevant"),
|
Irrelevant("ani.dantotsu.irrelevant", false),
|
||||||
AnimeDownloads("animeDownloads"), //different for legacy reasons
|
AnimeDownloads("animeDownloads", false), //different for legacy reasons
|
||||||
Protected("ani.dantotsu.protected")
|
Protected("ani.dantotsu.protected", false),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue