Moving the showCurrentDessert() call to the right place

This commit is contained in:
Jhansi 2020-01-14 12:53:50 -08:00
parent df30c589f0
commit dc6837efaf

View File

@ -91,6 +91,8 @@ class MainActivity : AppCompatActivity() {
dessertsSold = savedInstanceState.getInt(KEY_DESSERT_SOLD, 0) dessertsSold = savedInstanceState.getInt(KEY_DESSERT_SOLD, 0)
dessertTimer.secondsCount = dessertTimer.secondsCount =
savedInstanceState.getInt(KEY_TIMER_SECONDS, 0) savedInstanceState.getInt(KEY_TIMER_SECONDS, 0)
// Show the next dessert
showCurrentDessert()
} }
// Set the TextViews to the right values // Set the TextViews to the right values
@ -177,7 +179,6 @@ class MainActivity : AppCompatActivity() {
outState.putInt(KEY_REVENUE, revenue) outState.putInt(KEY_REVENUE, revenue)
outState.putInt(KEY_DESSERT_SOLD, dessertsSold) outState.putInt(KEY_DESSERT_SOLD, dessertsSold)
outState.putInt(KEY_TIMER_SECONDS, dessertTimer.secondsCount) outState.putInt(KEY_TIMER_SECONDS, dessertTimer.secondsCount)
showCurrentDessert()
} }
/** Lifecycle Methods **/ /** Lifecycle Methods **/