Skip to content

Commit

Permalink
Bump to PoC v9 + update libraries
Browse files Browse the repository at this point in the history
Signed-off-by: iTaysonLab <[email protected]>
  • Loading branch information
iTaysonLab committed Jun 6, 2022
1 parent 6a25782 commit 5140d6d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'dev.zacsweers.moshix' version '0.17.1'
id 'dev.zacsweers.moshix' version '0.17.2'
id 'dagger.hilt.android.plugin'
id 'kotlin-kapt'
id "com.google.protobuf" version "0.8.18"
Expand All @@ -14,8 +14,8 @@ android {
applicationId "bruhcollective.itaysonlab.jetispot"
minSdk 23
targetSdk 32
versionCode 5
versionName "poc_v8"
versionCode 6
versionName "poc_v9"
resConfigs "en"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -90,7 +90,7 @@ dependencies {
implementation "androidx.navigation:navigation-compose:2.4.2"
implementation 'androidx.activity:activity-compose:1.4.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:1.2.0-beta02"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.compose.material3:material3:$compose_m3_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import bruhcollective.itaysonlab.jetispot.ui.ext.compositeSurfaceElevation
import bruhcollective.itaysonlab.jetispot.ui.screens.Screen
import bruhcollective.itaysonlab.jetispot.ui.screens.nowplaying.NowPlayingScreen
import bruhcollective.itaysonlab.jetispot.ui.theme.ApplicationTheme
import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
import com.google.accompanist.navigation.material.ModalBottomSheetLayout
import com.google.accompanist.navigation.material.rememberBottomSheetNavigator
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -71,7 +74,7 @@ class MainActivity : ComponentActivity() {
super.onBackPressed()
}

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterialNavigationApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand All @@ -84,7 +87,8 @@ class MainActivity : ComponentActivity() {
val sysUiController = rememberSystemUiController()
val bsState = rememberBottomSheetScaffoldState()

val navController = rememberNavController()
val bottomSheetNavigator = rememberBottomSheetNavigator()
val navController = rememberNavController(bottomSheetNavigator)
val navBackStackEntry by navController.currentBackStackEntryAsState()
val lambdaNavController = LambdaNavigationController { navController }

Expand Down Expand Up @@ -160,21 +164,23 @@ class MainActivity : ComponentActivity() {
}
}
) { innerPadding ->
BottomSheetScaffold(
sheetContent = {
NowPlayingScreen(
navController = lambdaNavController,
bottomSheetState = bsState.bottomSheetState,
bsOffset = bsOffset
)
},
scaffoldState = bsState,
sheetPeekHeight = bsPeek,
backgroundColor = MaterialTheme.colorScheme.surface
) { innerScaffoldPadding ->
AppNavigation(navController = navController, provideLambdaController = lambdaNavController, sessionManager = sessionManager, authManager = authManager, modifier = Modifier
.padding(innerScaffoldPadding)
.padding(bottom = if (bsVisible) 0.dp else 80.dp + navBarHeightDp))
ModalBottomSheetLayout(bottomSheetNavigator = bottomSheetNavigator) {
BottomSheetScaffold(
sheetContent = {
NowPlayingScreen(
navController = lambdaNavController,
bottomSheetState = bsState.bottomSheetState,
bsOffset = bsOffset
)
},
scaffoldState = bsState,
sheetPeekHeight = bsPeek,
backgroundColor = MaterialTheme.colorScheme.surface
) { innerScaffoldPadding ->
AppNavigation(navController = navController, provideLambdaController = lambdaNavController, sessionManager = sessionManager, authManager = authManager, modifier = Modifier
.padding(innerScaffoldPadding)
.padding(bottom = if (bsVisible) 0.dp else 80.dp + navBarHeightDp))
}
}
}
}
Expand Down

0 comments on commit 5140d6d

Please sign in to comment.