Skip to content

Commit

Permalink
#39 [chore] : 코드 정리
Browse files Browse the repository at this point in the history
  • Loading branch information
yskim6772 committed Jan 18, 2025
1 parent a6c0c18 commit d56e86e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.hilt.navigation.compose.hiltViewModel
import com.sopt.withsuhyeon.R
import com.sopt.withsuhyeon.core.component.list.TotalChatRoomList
import com.sopt.withsuhyeon.core.component.topbar.MainTopNavBar
import com.sopt.withsuhyeon.domain.entity.ChatRoomModel
import com.sopt.withsuhyeon.ui.theme.WithSuhyeonTheme.colors

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ import com.sopt.withsuhyeon.domain.entity.ChatRoomModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import javax.inject.Inject

@HiltViewModel
class ChatViewModel @Inject constructor(
) : ViewModel() {

private val _chatRooms = MutableStateFlow<List<ChatRoomModel>>(emptyList())
val chatRooms: StateFlow<List<ChatRoomModel>> get() = _chatRooms

init {
_chatRooms.value = listOf(
private val _chatRooms = MutableStateFlow(
listOf(
ChatRoomModel(
profileImage = "https://via.placeholder.com/150",
partnerName = "작심이 친구",
Expand Down Expand Up @@ -87,5 +85,6 @@ class ChatViewModel @Inject constructor(
unreadChatCount = "98"
),
)
}
)
val chatRooms: StateFlow<List<ChatRoomModel>> = _chatRooms.asStateFlow()
}

0 comments on commit d56e86e

Please sign in to comment.