-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AN/USER] 티켓 제시 화면 2개 버그 해결 (#519) #520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오류 수정 감사합니다! 궁금한 점만 남겨봤습니다!
TicketEntryService.ticketStateChangeEvent.first { | ||
Toast.makeText(this, "티켓이 스캔되었습니다.", Toast.LENGTH_SHORT).show() | ||
setResult(RESULT_OK, intent) | ||
finish() | ||
true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한번만 받아야하는 이벤트군요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 collect나 collectLast를 하면 티켓이 스캔되었습니다! 가 계속 뜨게 됩니다!
private fun setTimer(ticketId: Long, ticketCode: TicketCode) { | ||
viewModelScope.launch { | ||
timer.timerListener = createTimerListener(ticketId) | ||
timer.start(ticketCode.period) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 바꾸면 타이머가 정상 작동하나요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전에는 왜 문제가 있었던건가요 ?_?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정확한 이유는 모르겠으나 combine안에서 timer를 호출하게 된다면 다른 corutineScope안에서 타이머가 동작하게 되어서 문제가 생기게 되었다고 보고있습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
private fun setTimer(ticketId: Long, ticketCode: TicketCode) { | ||
viewModelScope.launch { | ||
timer.timerListener = createTimerListener(ticketId) | ||
timer.start(ticketCode.period) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전에는 왜 문제가 있었던건가요 ?_?
📌 관련 이슈
✨ PR 세부 내용