mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-22 22:11:49 +01:00
Add a method to return format in AppItem
This commit is contained in:
parent
d1fd44e32e
commit
ee98aaaed1
@ -49,19 +49,26 @@ data class AppItem(private val meta : AppEntry) : DataItem() {
|
||||
*/
|
||||
val uri get() = meta.uri
|
||||
|
||||
/**
|
||||
* The format of the application
|
||||
*/
|
||||
val format get() = meta.format
|
||||
|
||||
val loaderResult get() = meta.loaderResult
|
||||
|
||||
fun loaderResultString(context : Context) = context.getString(when (meta.loaderResult) {
|
||||
LoaderResult.Success -> R.string.metadata_missing
|
||||
fun loaderResultString(context : Context) = context.getString(
|
||||
when (meta.loaderResult) {
|
||||
LoaderResult.Success -> R.string.metadata_missing
|
||||
|
||||
LoaderResult.ParsingError -> R.string.invalid_file
|
||||
LoaderResult.ParsingError -> R.string.invalid_file
|
||||
|
||||
LoaderResult.MissingTitleKey -> R.string.missing_title_key
|
||||
LoaderResult.MissingTitleKey -> R.string.missing_title_key
|
||||
|
||||
LoaderResult.MissingHeaderKey,
|
||||
LoaderResult.MissingTitleKek,
|
||||
LoaderResult.MissingKeyArea -> R.string.incomplete_prod_keys
|
||||
})
|
||||
LoaderResult.MissingHeaderKey,
|
||||
LoaderResult.MissingTitleKek,
|
||||
LoaderResult.MissingKeyArea -> R.string.incomplete_prod_keys
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* The name and author is used as the key
|
||||
|
Loading…
Reference in New Issue
Block a user