Solve map not being updated
This commit is contained in:
parent
aa02be8304
commit
7f1eb73847
@ -35,9 +35,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
private lateinit var psvg : PSVGWrapper
|
private lateinit var psvg : PSVGWrapper
|
||||||
private lateinit var css : CSSWrapper
|
private lateinit var css : CSSWrapper
|
||||||
|
|
||||||
override fun onActivityReenter(resultCode: Int, data: Intent?) {
|
override fun onRestart() {
|
||||||
super.onActivityReenter(resultCode, data)
|
|
||||||
refreshMap()
|
refreshMap()
|
||||||
|
super.onRestart()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@ -81,7 +81,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// Restore visited countries
|
// Restore visited countries
|
||||||
visited = Visited(this)
|
visited = Visited(this)
|
||||||
visited.load()
|
|
||||||
|
|
||||||
// Wrap lists of countries
|
// Wrap lists of countries
|
||||||
psvg = PSVGWrapper(this)
|
psvg = PSVGWrapper(this)
|
||||||
@ -98,6 +97,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun refreshMap() {
|
private fun refreshMap() {
|
||||||
|
visited.load()
|
||||||
val opt : RenderOptions = RenderOptions.create()
|
val opt : RenderOptions = RenderOptions.create()
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
opt.css(css.get())
|
opt.css(css.get())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user