Skip to content

Commit

Permalink
Merge pull request #18 from stslex/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
stslex authored Dec 1, 2023
2 parents b365fd1 + 80a7726 commit 42dda26
Show file tree
Hide file tree
Showing 12 changed files with 399 additions and 262 deletions.
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

0 comments on commit 42dda26

Please sign in to comment.