Repository navigation
[GMSS-287]탈퇴/로그아웃 시 메인 탭 ViewModel이 정리되지 않던 문제 수정 - #68
Merged
Merged
Conversation
- Nav3 항목에 저장 가능한 상태 홀더와 ViewModelStore 데코레이터를 연결 - decorate entries를 NavDisplay에 전달해 화면 전환 시 상태 캐시를 유지
seunghee17
marked this pull request as ready for review
September 22, 2026 10:46
soyeonLee126
approved these changes
Sep 28, 2026
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.
작업 개요
탈퇴 또는 로그아웃 후 이전 계정의 채팅방 리스트가 간헐적으로 남아있는 문제를 고칩니다.
원인은
MainScreen안쪽 탭(홈/보관함/대화 등)의 ViewModel이 Activity의 ViewModelStore에 직접 매달려 있었다는 점입니다. 탈퇴/로그아웃으로MainKey가 루트 백스택에서 빠져도 이 ViewModel들은 정리되지 않았고, 재로그인 시 같은ChattingListViewModel인스턴스(옛 목록 상태 포함)가 그대로 재사용되어, 새 목록 조회가 늦거나 실패하면 옛 목록이 그대로 노출됐습니다.작업 유형
변경 사항
GamssRootNavHost의 루트NavDisplay엔트리에rememberViewModelStoreNavEntryDecorator를 추가해,MainKey엔트리마다 독립된 ViewModelStore를 갖게 합니다.replaceRoot(LoginKey)가MainKey를 루트 백스택에서 pop하면 이 스토어가 clear되고, 그 안의 탭별 ViewModelStore(EntryViewModel)도 cascade로 함께 clear되어ChattingListViewModel을 포함한 메인 영역의 모든 ViewModel이 로그아웃/탈퇴 시점에 정리됩니다.MainKey자체가 pop되지 않으므로 지워지지 않아, 기존 동작(탭 이동 시 화면/ViewModel 상태 유지)에는 영향이 없습니다.관련 이슈
관련 작업 (Notion)
GMSS-287
스크린샷 / 동작 화면
체크리스트
develop으로 설정되어 있다feat:,fix:등)을 따른다리뷰 요청 사항
MainScreen안쪽 다른 탭(홈/보관함/설정 등)의 ViewModel도 같은 구조로 정리되는지 함께 봐 주세요. 이번 수정은 특정 탭이 아니라 루트 스코프 자체를 고쳐서, 모든 탭에 적용됩니다.