Skip to content

Conversation

@JaeYoung290
Copy link
Owner

15주차 과제 PR입니다.

Copy link

@skdud0629 skdud0629 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

var debouncing: Job? = null
binding.searchInput.addTextChangedListener { text ->
debouncing?.cancel()
debouncing = lifecycleScope.launch {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeatOnLifecycle도 알아보셨으면 좋을 것 같습니다!


class MainActivity : AppCompatActivity() {

private lateinit var viewModel: MainViewModel

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by viewModels로 선언해주세요!

if (_isLoading.value == true) return

if (query != newQuery) {
query = newQuery

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trim()을 이용해 불필요한 공백 차이로 인해 중복 요청이 발생하는 것을 방지해주세요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants