forked from MeloNX/MeloNX
fix title updates data being missing
This commit is contained in:
parent
976514fdcc
commit
f3531394d5
@ -87,6 +87,8 @@ class TitleUpdateViewModel(val titleId: String) {
|
|||||||
init {
|
init {
|
||||||
jsonPath = (MainActivity.AppPath
|
jsonPath = (MainActivity.AppPath
|
||||||
?: "") + "/games/" + titleId.toLowerCase(Locale.current) + "/updates.json"
|
?: "") + "/games/" + titleId.toLowerCase(Locale.current) + "/updates.json"
|
||||||
|
|
||||||
|
data = TitleUpdateMetadata()
|
||||||
if (File(jsonPath).exists()) {
|
if (File(jsonPath).exists()) {
|
||||||
var gson = Gson()
|
var gson = Gson()
|
||||||
data = gson.fromJson(File(jsonPath).readText(), TitleUpdateMetadata::class.java)
|
data = gson.fromJson(File(jsonPath).readText(), TitleUpdateMetadata::class.java)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user