Skip to content
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

[#297] 투표화면 에러 토스트 발생하는 버그 #298

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

SEO-J17
Copy link
Collaborator

@SEO-J17 SEO-J17 commented Sep 5, 2024

Issue No

Overview (Required)

  • 조건문 추가해서 수정 완료 했슴다~~

Screenshot

KakaoTalk_Video_2024-09-05-10-46-39.mp4

@SEO-J17 SEO-J17 self-assigned this Sep 5, 2024
Comment on lines 57 to +58
LaunchedEffect(key1 = state.isError) {
coroutineScope.launch {
if (state.isError) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

궁금한 거. key가 state.isError인데 안에서 if문으로 한번더 체크를 해줘야 버그 없이 잘 뜨는건가 ..? 뭐가 다른건지 궁금해성

Copy link
Collaborator Author

@SEO-J17 SEO-J17 Sep 5, 2024

Choose a reason for hiding this comment

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

내가 이해한거로는? LaunchedEffect의 key에 할당된 값이 변할때마다 실행되는 걸로 알고 있는데, true / false에 상관없이 이미 초기값이 false로 할당되니깐 그때 실행이 되는거 같아! Boolean값이 중요한게 아니라 key에 할당된 값이 변하는지 안변하는지가 중요한거라고 이해했엉. 그래서 초기에 값을 할당하니깐 뭔가 변화를 감지하고 실행한거 같아..!

Copy link
Collaborator

@JeonK1 JeonK1 left a comment

Choose a reason for hiding this comment

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

예리했다 정우형..

@SEO-J17 SEO-J17 merged commit 518dd88 into develop Sep 6, 2024
1 check passed
@SEO-J17 SEO-J17 deleted the bug/#297-vote-error-toast-bug branch September 6, 2024 00:07
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.

투표화면 에러 토스트 발생하는 버그
4 participants