fix(chat): 배경 선택 다이얼로그에서 초기 선택 복원이 되지 않는 문제 수정

- 선택 상태를 URL 비교에서 이미지 ID 우선 방식으로 변경
- URL만 저장된 기존 데이터에 대해 목록 로드 후 URL→ID 마이그레이션 추가
- SharedPreferences에 chat_bg_image_id_room_{roomId} 키 도입(호환 위해 URL 키 유지)
This commit is contained in:
2025-08-27 15:53:43 +09:00
parent 02df0b6774
commit 88e3ae7b51
6 changed files with 44 additions and 45 deletions

View File

@@ -27,10 +27,10 @@ class ChatRepositoryTest {
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))
every { api.enterChatRoom(any(), any(), any()) } returns Single.just(ApiResponse(true, resp, null))
coEvery { dao.getNthLatestCreatedAt(any(), any()) } returns null
val result = repo.enterChatRoom("token", 99).blockingGet()
val result = repo.enterChatRoom("token", 99, null).blockingGet()
// 반환 검증
assertEquals(99, result.roomId)