fix(character-detail): characterId 전달 및 상세 탭 전환 로직 수정
fix(character-detail): 탭 전환 시 프래그먼트 캐싱하여 재로딩 방지 CharacterDetailFragment에 newInstance(characterId) 도입 및 ARG 전달 구조 추가. Fragment에서 잘못된 intent 참조 제거하고 arguments → activity.intent 순으로 안전하게 조회. Activity 초기 진입 시 상세 탭 로딩 경로 정리 및 characterId 유효성 검사 시 종료 처리 보강. replace 기반 교체를 add/show/hide 구조로 전환. TAG_DETAIL/TAG_GALLERY로 인스턴스를 식별하여 FragmentManager 복원/재사용. 탭 이동 시 기존 인스턴스 표시만 수행하여 onViewCreated 재호출/네트워크 재요청 방지.
This commit is contained in:
@@ -5,6 +5,7 @@ import io.mockk.coVerify
|
||||
import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
import kr.co.vividnext.sodalive.chat.character.detail.detail.CharacterType
|
||||
import kr.co.vividnext.sodalive.chat.talk.TalkApi
|
||||
import kr.co.vividnext.sodalive.chat.talk.room.db.ChatMessageDao
|
||||
import kr.co.vividnext.sodalive.common.ApiResponse
|
||||
@@ -23,7 +24,7 @@ class ChatRepositoryTest {
|
||||
ServerChatMessage(1, "a1", "", mine = false, createdAt = 1000L),
|
||||
ServerChatMessage(2, "u1", "", mine = true, createdAt = 2000L)
|
||||
)
|
||||
val character = CharacterInfo(10, "name", "", kr.co.vividnext.sodalive.chat.character.detail.CharacterType.CLONE)
|
||||
val character = CharacterInfo(10, "name", "", CharacterType.CLONE)
|
||||
val resp = ChatRoomEnterResponse(99, character, serverMessages, hasMoreMessages = false)
|
||||
|
||||
every { api.enterChatRoom(any(), any()) } returns Single.just(ApiResponse(true, resp, null))
|
||||
|
||||
Reference in New Issue
Block a user