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

[Bug]: Deck 제목 수정 반응 없음 #12

Closed
comye1 opened this issue Feb 22, 2022 · 1 comment
Closed

[Bug]: Deck 제목 수정 반응 없음 #12

comye1 opened this issue Feb 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@comye1
Copy link
Contributor

comye1 commented Feb 22, 2022

버그 설명

  • Deck 제목/visible 수정 기능에서 제목만 수정이 반영 안 됨
@comye1 comye1 added the bug Something isn't working label Feb 22, 2022
@comye1
Copy link
Contributor Author

comye1 commented Feb 22, 2022

코드가 이따구였다

update 호출하도록 코드를 수정하는 과정에서 조건문 수정하는 것을 빠트렸다.

    if (shared != it.shared && title == it.deckTitle){ 
        database.child("all/decks/${it.key}").apply {
            child("deckTitle").setValue(title)
            child("shared").setValue(shared)
        }
        deck.value!!.deckTitle = title
        deck.value!!.shared = shared
        update()
    }

↓↓↓↓↓↓↓↓↓↓↓↓↓

    if (shared != it.shared || title != it.deckTitle){
        database.child("all/decks/${it.key}").apply {
            child("deckTitle").setValue(title)
            child("shared").setValue(shared)
        }
        deck.value!!.deckTitle = title
        deck.value!!.shared = shared
        update()
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant