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

Downgrade protobuf from 4.28.1 to 4.26.1 #1105

Merged
merged 4 commits into from
Sep 20, 2024
Merged
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
8 changes: 4 additions & 4 deletions app/dependencies/prodReleaseRuntimeClasspath.tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
| +--- com.google.firebase:firebase-annotations:16.2.0 (*)
| +--- com.google.firebase:firebase-installations-interop:17.1.0 -> 17.2.0 (*)
| +--- com.google.firebase:protolite-well-known-types:18.0.0
| | \--- com.google.protobuf:protobuf-javalite:3.14.0 -> 4.28.1
| | \--- com.google.protobuf:protobuf-javalite:3.14.0 -> 4.26.1
| +--- com.google.firebase:firebase-common:21.0.0 (*)
| +--- com.google.firebase:firebase-common-ktx:21.0.0 (*)
| +--- com.google.firebase:firebase-components:18.0.0 (*)
Expand Down Expand Up @@ -587,7 +587,7 @@
| | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.6 (c)
| | \--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.6 (c)
| +--- com.google.android.gms:play-services-tasks:18.0.1 -> 18.2.0 (*)
| +--- com.google.protobuf:protobuf-javalite:3.21.11 -> 4.28.1
| +--- com.google.protobuf:protobuf-javalite:3.21.11 -> 4.26.1
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.20 (*)
| +--- androidx.appcompat:appcompat:1.2.0 -> 1.7.0
| | +--- androidx.activity:activity:1.7.0 -> 1.9.2 (*)
Expand Down Expand Up @@ -1230,8 +1230,8 @@
| | +--- project :core:datastore
| | | +--- androidx.datastore:datastore:1.1.1 (*)
| | | +--- project :core:datastore-proto
| | | | +--- com.google.protobuf:protobuf-kotlin-lite:4.28.1
| | | | | +--- com.google.protobuf:protobuf-javalite:4.28.1
| | | | +--- com.google.protobuf:protobuf-kotlin-lite:4.26.1
| | | | | +--- com.google.protobuf:protobuf-javalite:4.26.1
| | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 2.0.20 (*)
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.20 (*)
| | | +--- project :core:model (*)
Expand Down
4 changes: 2 additions & 2 deletions app/dependencies/prodReleaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ com.google.j2objc:j2objc-annotations:1.3
com.google.mlkit:barcode-scanning-common:17.0.0
com.google.mlkit:common:18.9.0
com.google.mlkit:vision-common:17.0.0
com.google.protobuf:protobuf-javalite:4.28.1
com.google.protobuf:protobuf-kotlin-lite:4.28.1
com.google.protobuf:protobuf-javalite:4.26.1
com.google.protobuf:protobuf-kotlin-lite:4.26.1
com.google.zxing:core:3.5.3
com.jakewharton.timber:timber:5.0.1
com.squareup.moshi:moshi:1.15.1
Expand Down
2 changes: 1 addition & 1 deletion app/prodRelease-badging.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package: name='com.niyaj.poposroom' versionCode='1' versionName='2024.9.2-beta.0.13' platformBuildVersionName='14' platformBuildVersionCode='34' compileSdkVersion='34' compileSdkVersionCodename='14'
package: name='com.niyaj.poposroom' versionCode='1' versionName='0.0.1-beta.0.1' platformBuildVersionName='14' platformBuildVersionCode='34' compileSdkVersion='34' compileSdkVersionCodename='14'
sdkVersion:'26'
targetSdkVersion:'34'
uses-permission: name='android.permission.FOREGROUND_SERVICE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.DrawerState
import androidx.compose.material3.DrawerValue.Closed
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FabPosition
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalNavigationDrawer
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.rememberDrawerState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.Stable
Expand All @@ -43,14 +45,14 @@ import com.niyaj.designsystem.components.PoposCenterAlignedTopAppBar
@OptIn(ExperimentalMaterial3Api::class)
fun HomeScreenScaffold(
currentRoute: String,
drawerState: DrawerState,
onNavigateToScreen: (String) -> Unit,
title: @Composable () -> Unit,
modifier: Modifier = Modifier,
navigationIcon: @Composable () -> Unit = {},
navActions: @Composable RowScope.() -> Unit = {},
floatingActionButton: @Composable () -> Unit = {},
fabPosition: FabPosition = FabPosition.End,
drawerState: DrawerState = rememberDrawerState(initialValue = Closed),
snackbarHostState: SnackbarHostState = remember { SnackbarHostState() },
content: @Composable (padding: PaddingValues) -> Unit = {},
) {
Expand All @@ -69,6 +71,7 @@ fun HomeScreenScaffold(
drawerContent = {
PoposDrawer(
modifier = Modifier.testTag("homeAppDrawer"),
drawerState = drawerState,
currentRoute = currentRoute,
onNavigateToScreen = onNavigateToScreen,
)
Expand Down
19 changes: 12 additions & 7 deletions core/ui/src/main/java/com/niyaj/ui/components/PoposDrawer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.DrawerState
import androidx.compose.material3.DrawerValue.Closed
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
Expand All @@ -38,10 +40,11 @@ import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.NavigationDrawerItem
import androidx.compose.material3.NavigationDrawerItemDefaults
import androidx.compose.material3.Text
import androidx.compose.material3.rememberDrawerState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
Expand Down Expand Up @@ -72,16 +75,18 @@ fun PoposDrawer(
currentRoute: String,
onNavigateToScreen: (String) -> Unit,
modifier: Modifier = Modifier,
drawerState: DrawerState = rememberDrawerState(initialValue = Closed),
) {
val expanded = remember { mutableStateOf(false) }
val settingsExpanded = remember { mutableStateOf(false) }
val employeeExpanded = remember { mutableStateOf(false) }
val customersExpanded = remember { mutableStateOf(false) }
val ordersExpanded = remember { mutableStateOf(false) }
val marketItemExpanded = remember { mutableStateOf(false) }
val expanded = rememberSaveable { mutableStateOf(false) }
val settingsExpanded = rememberSaveable { mutableStateOf(false) }
val employeeExpanded = rememberSaveable { mutableStateOf(false) }
val customersExpanded = rememberSaveable { mutableStateOf(false) }
val ordersExpanded = rememberSaveable { mutableStateOf(false) }
val marketItemExpanded = rememberSaveable { mutableStateOf(false) }

ModalDrawerSheet(
modifier = modifier,
drawerState = drawerState,
) {
Column(
modifier = Modifier.weight(0.3f),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import androidx.compose.ui.test.performTextReplacement
import androidx.compose.ui.test.performTouchInput
import androidx.test.espresso.Espresso
import androidx.test.filters.SmallTest
import com.google.accompanist.navigation.material.ExperimentalMaterialNavigationApi
import com.niyaj.common.tags.AddOnTestTags.ADDON_APPLIED_SWITCH
import com.niyaj.common.tags.AddOnTestTags.ADDON_ITEM_LIST
import com.niyaj.common.tags.AddOnTestTags.ADDON_ITEM_TAG
Expand Down Expand Up @@ -148,7 +147,6 @@ class AddOnItemEndToEndTest {
updatedAt = null,
)

@OptIn(ExperimentalMaterialNavigationApi::class)
@Before
fun setup() {
hiltRule.inject()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.lazy.staggeredgrid.LazyStaggeredGridState
import androidx.compose.foundation.lazy.staggeredgrid.rememberLazyStaggeredGridState
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.DrawerValue
import androidx.compose.material3.DrawerState
import androidx.compose.material3.DrawerValue.Closed
import androidx.compose.material3.ElevatedCard
import androidx.compose.material3.FabPosition
import androidx.compose.material3.Icon
Expand Down Expand Up @@ -112,6 +113,7 @@ fun HomeScreen(
val lazyListState = rememberLazyListState()
val lazyRowState = rememberLazyStaggeredGridState()
val snackbarState = remember { SnackbarHostState() }
val drawerState = rememberDrawerState(initialValue = Closed)

val productState by viewModel.productsWithQuantity.collectAsStateWithLifecycle()
val categoriesState by viewModel.categories.collectAsStateWithLifecycle()
Expand Down Expand Up @@ -226,6 +228,7 @@ fun HomeScreen(
showKonfetti = showKonfetti.value,
hideKonfetti = { showKonfetti.value = false },
modifier = modifier,
drawerState = drawerState,
snackbarState = snackbarState,
lazyRowState = lazyRowState,
lazyListState = lazyListState,
Expand Down Expand Up @@ -256,12 +259,12 @@ fun HomeScreenContent(
hideKonfetti: () -> Unit,
modifier: Modifier = Modifier,
currentRoute: String = Screens.HOME_SCREEN,
drawerState: DrawerState = rememberDrawerState(initialValue = Closed),
snackbarState: SnackbarHostState = remember { SnackbarHostState() },
lazyRowState: LazyStaggeredGridState = rememberLazyStaggeredGridState(),
lazyListState: LazyListState = rememberLazyListState(),
) {
val scope = rememberCoroutineScope()
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val showSearchIcon = productState is Success
val animatedColor by animateColorAsState(
targetValue = if (selectedId != "0") {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ lottieVersion = "6.5.0"
moduleGraph = "2.5.0"
moshiVersion = '1.15.1'
posPrinterVersion = '3.4.0'
protobuf = "4.28.1"
protobuf = "4.26.1"
protobufPlugin = "0.9.4"
playScanner = "16.1.0"
playService = "18.5.0"
Expand Down