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