Skip to content

Commit

Permalink
-View Model Injection Impl (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhubaibKhan4 committed Mar 10, 2024
1 parent 6faf7c5 commit b0f2eeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,8 @@ fun DetailContent(
channelData: org.company.app.domain.model.channel.Item?,
viewModel: MainViewModel = koinInject<MainViewModel>()
) {
var stateRelevance by remember {
mutableStateOf<ResultState<Youtube>>(
ResultState.LOADING
)
}
var commentData by remember {
mutableStateOf<Comments?>(
null
)
}
var stateRelevance by remember { mutableStateOf<ResultState<Youtube>>(ResultState.LOADING) }
var commentData by remember {mutableStateOf<Comments?>(null) }
var descriptionEnabled by remember { mutableStateOf(false) }
var displayVideoPlayer by remember { mutableStateOf(false) }
var isCommentLive by remember { mutableStateOf(false) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,10 @@ fun SearchVideosList(youtube: Search) {

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchVideoItemCard(video: org.company.app.domain.model.search.Item) {
val repository = remember { Repository() }
val viewModel = remember { MainViewModel(repository) }
fun SearchVideoItemCard(
video: org.company.app.domain.model.search.Item,
viewModel: MainViewModel = koinInject<MainViewModel>(),
) {
var channelDetails by remember {
mutableStateOf<org.company.app.domain.model.channel.Channel?>(
null
Expand Down

0 comments on commit b0f2eeb

Please sign in to comment.