[Feature/hi/timer] 게임 중 화면에서 타이머 카운트 다운 구현하기#21
Draft
Conversation
cometj03
reviewed
Mar 12, 2024
| val mHandler = Handler(Looper.getMainLooper()) | ||
|
|
||
| mHandler.postDelayed({ | ||
| suspend { |
There was a problem hiding this comment.
suspend 키워드는 없어도 될 것 같습니다!
이렇게 해두면 함수 정의만 하고 실행을 안 한 거랑 같아서 실행이 안 될거예요
| } | ||
|
|
||
| mainViewModel.formattedTime | ||
| .buffer() |
There was a problem hiding this comment.
buffer() 가 어떤 역할을 하는 함수인가요? 그리고 추가하신 이유가 있을까요?
| .collect { formattedTime -> | ||
| Log.d("play", formattedTime) | ||
| // UI 업데이트 | ||
| binding.tvPlayTime.text = formattedTime |
There was a problem hiding this comment.
단순히 텍스트 갱신만 한다면 데이터 바인딩으로도 가능할 것 같습니다!
|
|
||
| } | ||
| }, 0) | ||
| suspend { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe your changes
Issue
To reviewers