Skip to content

Commit

Permalink
Move viewmodel to param
Browse files Browse the repository at this point in the history
  • Loading branch information
mlykotom authored Dec 12, 2024
1 parent 343d020 commit 77b80fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ import com.google.android.samples.socialite.ui.navigation.TopLevelDestination
fun ChatList(
onChatClicked: (chatId: Long) -> Unit,
modifier: Modifier = Modifier,
viewModel: ChatListViewModel = hiltViewModel(),
) {
val viewModel: ChatListViewModel = hiltViewModel()
val chatList by viewModel.chats.collectAsStateWithLifecycle()
ChatList(chatList, onChatClicked, modifier)
}
Expand Down

0 comments on commit 77b80fc

Please sign in to comment.