Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev #18

Merged
merged 2 commits into from
Dec 1, 2023
Merged

dev #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composeApp/src/commonMain/kotlin/main_screen/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import cafe.adriel.voyager.navigator.tab.CurrentTab
import cafe.adriel.voyager.navigator.tab.TabNavigator
import com.stslex.core.ui.mvi.setupNavigator
import main_screen.bottom_nav_bar.BottomNavigationBar
import main_screen.bottom_nav_bar.FeedTab
import main_screen.bottom_nav_bar.BottomNavigationTabs

object MainScreen : Screen {

Expand All @@ -20,7 +20,7 @@ object MainScreen : Screen {
setupNavigator()

TabNavigator(
tab = FeedTab,
tab = BottomNavigationTabs.MATCH_FEED.tab,
) { tabNavigator ->
Scaffold(
content = { paddingValues ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ object AppDimension {
val medium = 10.dp
val large = 15.dp
}

object Elevation {
val smallest = 2.dp
val small = 4.dp
val medium = 8.dp
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import cafe.adriel.voyager.core.screen.Screen
import cafe.adriel.voyager.koin.getScreenModel
import com.stslex.feature.match_feed.ui.components.FeedScreenContent
import com.stslex.feature.match_feed.ui.components.FeedScreenError
import com.stslex.feature.match_feed.ui.components.FeedScreenLoading
import com.stslex.feature.match_feed.ui.components.MatchFeedScreenContent
import com.stslex.feature.match_feed.ui.components.MatchFeedScreenError
import com.stslex.feature.match_feed.ui.components.MatchFeedScreenLoading
import com.stslex.feature.match_feed.ui.store.MatchFeedStore
import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Action
import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Event.ErrorSnackBar
Expand Down Expand Up @@ -55,15 +55,25 @@ private fun MatchFeedScreen(
modifier = modifier.fillMaxSize()
) {
when (val screenState = state.screen) {
is ScreenState.Content -> FeedScreenContent(
is ScreenState.Content -> MatchFeedScreenContent(
loadMore = remember { { sendAction(Action.LoadFilms) } },
films = state.films,
screenState = screenState,
onFilmClick = remember { { sendAction(Action.FilmClick(it)) } },
onItemSwiped = remember {
{ direction, id ->
sendAction(
Action.FilmSwiped(
direction = direction,
uuid = id
)
)
}
},
)

is ScreenState.Error -> FeedScreenError(screenState.message)
ScreenState.Loading -> FeedScreenLoading()
is ScreenState.Error -> MatchFeedScreenError(screenState.message)
ScreenState.Loading -> MatchFeedScreenLoading()
}
}
}

This file was deleted.

This file was deleted.

Loading
Loading