-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
feature/chat/src/main/java/tht/feature/chat/mapper/ChatListModelMapper.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package tht.feature.chat.mapper | ||
|
||
import com.tht.tht.domain.chat.model.ChatListModel | ||
import tht.feature.chat.model.ChatListUiModel | ||
|
||
|
||
fun ChatListModel.toModel() = ChatListUiModel( | ||
chatRoomIdx = chatRoomIdx, | ||
partnerName = partnerName, | ||
partnerProfileUrl = partnerProfileUrl, | ||
currentMessage = currentMessage, | ||
messageTime = messageTime, | ||
) |
9 changes: 9 additions & 0 deletions
9
feature/chat/src/main/java/tht/feature/chat/model/ChatListUiModel.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package tht.feature.chat.model | ||
|
||
data class ChatListUiModel( | ||
val chatRoomIdx: Long, | ||
val partnerName: String, | ||
val partnerProfileUrl: String, | ||
val currentMessage: String, | ||
val messageTime: String, | ||
) |
This file contains 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
4 changes: 2 additions & 2 deletions
4
feature/chat/src/main/java/tht/feature/chat/viewmodel/detail/state/ChatDetailState.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package tht.feature.chat.viewmodel.detail.state | ||
|
||
import com.tht.tht.domain.chat.model.ChatListModel | ||
import kotlinx.collections.immutable.ImmutableList | ||
import kotlinx.collections.immutable.persistentListOf | ||
import tht.feature.chat.model.ChatListUiModel | ||
|
||
sealed class ChatDetailState { | ||
data class ChatList( | ||
val isLoading: Boolean, | ||
val chatList: ImmutableList<ChatListModel> = persistentListOf(), | ||
val chatList: ImmutableList<ChatListUiModel> = persistentListOf(), | ||
) : ChatDetailState() | ||
} |
4 changes: 2 additions & 2 deletions
4
feature/chat/src/main/java/tht/feature/chat/viewmodel/state/ChatSkeleton.kt
This file contains 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