diff --git a/app/src/main/java/com/illusionware/npsbrowser/AppData.kt b/app/src/main/java/com/illusionware/npsbrowser/AppData.kt index a195d6f..72ca3c2 100644 --- a/app/src/main/java/com/illusionware/npsbrowser/AppData.kt +++ b/app/src/main/java/com/illusionware/npsbrowser/AppData.kt @@ -5,7 +5,7 @@ import com.github.wrdlbrnft.sortedlistadapter.SortedListAdapter data class AppData( val titleID: String?, val region: String?, val title: String?, val link: String?, val license: String?, val contentID: String?, val lastDateTime: String?, - val fileSize: Number?, val sha256: String?, val minFW: String? + val fileSize: Number?, val version: String?, val sha256: String?, val minFW: String? ) : SortedListAdapter.ViewModel { override fun equals(other: Any?): Boolean { if (this === other) return true @@ -21,6 +21,7 @@ data class AppData( if (contentID != other.contentID) return false if (lastDateTime != other.lastDateTime) return false if (fileSize != other.fileSize) return false + if (version != other.version) return false if (sha256 != other.sha256) return false if (minFW != other.minFW) return false @@ -36,6 +37,7 @@ data class AppData( result = 31 * result + (contentID?.hashCode() ?: 0) result = 31 * result + (lastDateTime?.hashCode() ?: 0) result = 31 * result + (fileSize?.hashCode() ?: 0) + result = 31 * result + (version?.hashCode() ?: 0) result = 31 * result + (sha256?.hashCode() ?: 0) result = 31 * result + (minFW?.hashCode() ?: 0) return result diff --git a/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt b/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt index f439e4c..aeac6fd 100644 --- a/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt +++ b/app/src/main/java/com/illusionware/npsbrowser/fragments/SingleAppFragment.kt @@ -47,6 +47,11 @@ class SingleAppFragment : Fragment() { view?.findViewById(R.id.singleAppSizeTitle)?.visibility = View.INVISIBLE } view?.findViewById(R.id.singleAppContentId)?.text = app.contentID + if (app.version != null) { + view?.findViewById(R.id.singleAppVer)?.text = app.version + } else { + view?.findViewById(R.id.singleAppVerTitle)?.visibility = View.INVISIBLE + } view?.findViewById(R.id.singleAppFwVer)?.text = app.minFW // TODO: get and set app icon if (app.minFW.isNullOrBlank()) { @@ -59,10 +64,12 @@ class SingleAppFragment : Fragment() { if (app.link == "CART ONLY") { view?.findViewById(R.id.singleAppError)?.text = getString(R.string.cart_only) view?.findViewById