Skip to content

Commit fdef530

Browse files
committed
Refactor OneActivity to set timer ID unconditionally to survive process death
1 parent b87b0ae commit fdef530

File tree

1 file changed

+4
-6
lines changed
  • app-timer-one/src/main/java/xyz/aprildown/timer/app/timer/one

1 file changed

+4
-6
lines changed

app-timer-one/src/main/java/xyz/aprildown/timer/app/timer/one/OneActivity.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ class OneActivity : BaseActivity(), OneActivityInterface {
4141

4242
volumeControlStream = storedAudioTypeValue
4343

44-
if (savedInstanceState == null) {
45-
viewModel.setTimerId(
46-
intent?.getIntExtra(Constants.EXTRA_TIMER_ID, TimerEntity.NULL_ID)
47-
?: TimerEntity.NULL_ID
48-
)
49-
}
44+
viewModel.setTimerId(
45+
intent?.getIntExtra(Constants.EXTRA_TIMER_ID, TimerEntity.NULL_ID)
46+
?: TimerEntity.NULL_ID
47+
)
5048
}
5149

5250
override fun onSupportNavigateUp(): Boolean {

0 commit comments

Comments
 (0)