Skip to content

Commit

Permalink
fix: 리프레시에 타이머가 제대로 돌지 않는 상황 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
re4rk committed Oct 8, 2023
1 parent 473b0b7 commit 92f4b6e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ class TicketEntryViewModel @Inject constructor(
}
}

private suspend fun setTimer(ticketId: Long, ticketCode: TicketCode) {
timer.timerListener = createTimerListener(ticketId)
timer.start(ticketCode.period)
private fun setTimer(ticketId: Long, ticketCode: TicketCode) {
viewModelScope.launch {
timer.timerListener = createTimerListener(ticketId)
timer.start(ticketCode.period)
}
}

private fun createTimerListener(ticketId: Long): TimerListener = object : TimerListener {
Expand Down

0 comments on commit 92f4b6e

Please sign in to comment.