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

Fragment LiveData에 LifecycleOwner 조정 #12

Closed
fornewid opened this issue May 17, 2019 · 0 comments · Fixed by #20
Closed

Fragment LiveData에 LifecycleOwner 조정 #12

fornewid opened this issue May 17, 2019 · 0 comments · Fixed by #20

Comments

@fornewid
Copy link
Member

Fragment 내에서 LiveData를 Fragment LifecycleOwner에 연결하고 있다.
이 Lifecycle은 다음 화면으로 이동할 때 해제되지 않아, 화면을 되돌아올 때 LiveData가 중첩 호출되고 있음.
Fragment의 ViewLifecycleOwner로 교체 필요함.

  • 비교:
    LifecycleOwner - onDestroy()에서 해제
    ViewLifecycleOwner - onDestroyView()에서 해제

Links

Android Architecture Components Sample Issues:

@fornewid fornewid added the bug label May 17, 2019
fornewid added a commit that referenced this issue May 26, 2019
#12 Use viewLifecycleOwner, instead of lifecycle
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 a pull request may close this issue.

1 participant