fix previous matches load
This commit is contained in:
parent
464cda09b9
commit
27f509a835
@ -10,7 +10,7 @@ android {
|
||||
applicationId "adrienmalin.pingpoints"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionCode 4
|
||||
versionCode 5
|
||||
versionName "2.0"
|
||||
vectorDrawables.useSupportLibrary true
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ class VictoryActivity : AppCompatActivity() {
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
||||
setContentView(R.layout.activity_victory)
|
||||
|
||||
initVictoryModel()
|
||||
previousMatch = getPreferences(Context.MODE_PRIVATE)
|
||||
initVictoryModel()
|
||||
updateUI()
|
||||
saveScore()
|
||||
}
|
||||
@ -45,6 +45,7 @@ class VictoryActivity : AppCompatActivity() {
|
||||
intent.getIntExtra("player2Score", 0)
|
||||
)
|
||||
)
|
||||
previousMatch?.apply{ previousMatches = getString("previousMatches", "") }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -63,7 +64,7 @@ class VictoryActivity : AppCompatActivity() {
|
||||
this@VictoryActivity,
|
||||
R.layout.grid_item,
|
||||
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