fix previous matches load
This commit is contained in:
parent
464cda09b9
commit
27f509a835
app
@ -10,7 +10,7 @@ android {
|
|||||||
applicationId "adrienmalin.pingpoints"
|
applicationId "adrienmalin.pingpoints"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 4
|
versionCode 5
|
||||||
versionName "2.0"
|
versionName "2.0"
|
||||||
vectorDrawables.useSupportLibrary true
|
vectorDrawables.useSupportLibrary true
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@ class VictoryActivity : AppCompatActivity() {
|
|||||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
||||||
setContentView(R.layout.activity_victory)
|
setContentView(R.layout.activity_victory)
|
||||||
|
|
||||||
initVictoryModel()
|
|
||||||
previousMatch = getPreferences(Context.MODE_PRIVATE)
|
previousMatch = getPreferences(Context.MODE_PRIVATE)
|
||||||
|
initVictoryModel()
|
||||||
updateUI()
|
updateUI()
|
||||||
saveScore()
|
saveScore()
|
||||||
}
|
}
|
||||||
@ -45,6 +45,7 @@ class VictoryActivity : AppCompatActivity() {
|
|||||||
intent.getIntExtra("player2Score", 0)
|
intent.getIntExtra("player2Score", 0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
previousMatch?.apply{ previousMatches = getString("previousMatches", "") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +64,7 @@ class VictoryActivity : AppCompatActivity() {
|
|||||||
this@VictoryActivity,
|
this@VictoryActivity,
|
||||||
R.layout.grid_item,
|
R.layout.grid_item,
|
||||||
R.id.grid_item_text,
|
R.id.grid_item_text,
|
||||||
previousMatch?.getString("previousMatches", "")?.split("\t|\n".toRegex())?.toMutableList()
|
previousMatches.split("\t|\n".toRegex())?.toMutableList()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user