Open-source Android PDF and document toolkit with PDF tools, Office viewing, XLSX editing, scanning, and image editing. Built with Kotlin and Jetpack Compose.
Rust androiddocument-scannerdocximage-editorjetpack-composekotlinliquid-glassofflineopen-sourcepdfpdf-compressorpdf-editorpdf-mergerpdf-readerpdf-splitterpdf-toolspdf-viewerpptxspreadsheet-editorxlsx
Restore release navbar behavior
Chethan616e8149f267f6b
diff --git a/app/src/main/java/com/chethan616/clearpdf/ui/components/LiquidBottomTabs.kt b/app/src/main/java/com/chethan616/clearpdf/ui/components/LiquidBottomTabs.ktindex 933410c..57f52ee 100644--- a/app/src/main/java/com/chethan616/clearpdf/ui/components/LiquidBottomTabs.kt+++ b/app/src/main/java/com/chethan616/clearpdf/ui/components/LiquidBottomTabs.kt@@ -17,7 +17,6 @@ import androidx.compose.runtime.derivedStateOfimport androidx.compose.runtime.getValueimport androidx.compose.runtime.mutableIntStateOfimport androidx.compose.runtime.remember-import androidx.compose.runtime.rememberUpdatedStateimport androidx.compose.runtime.rememberCoroutineScopeimport androidx.compose.runtime.setValueimport androidx.compose.runtime.snapshotFlow@@ -38,7 +37,6 @@ import androidx.compose.ui.util.fastCoerceInimport androidx.compose.ui.util.fastRoundToIntimport androidx.compose.ui.util.lerpimport com.chethan616.clearpdf.ui.theme.LocalIsDarkMode-import com.chethan616.clearpdf.ui.theme.LiquidGlassColorsimport com.chethan616.clearpdf.ui.utils.DampedDragAnimationimport com.chethan616.clearpdf.ui.utils.InteractiveHighlightimport com.kyant.backdrop.Backdrop@@ -72,9 +70,12 @@ fun LiquidBottomTabs() {val isDarkMode = LocalIsDarkMode.currentval isLightTheme = !isDarkMode- val accentColor = LiquidGlassColors.Blue- val containerColor = surfaceColor ?: if (isLightTheme) Color(0xFFFAFAFA).copy(0.4f)- else Color(0xFF121212).copy(0.4f)+ val accentColor =+ if (isLightTheme) Color(0xFF0088FF)+ else Color(0xFF0091FF)+ val containerColor =+ surfaceColor ?: if (isLightTheme) Color(0xFFFAFAFA).copy(0.4f)+ else Color(0xFF121212).copy(0.4f)val contentHeight = (barHeight - 8.dp).coerceAtLeast(0.dp)val tabsBackdrop = rememberLayerBackdrop()@@ -100,8 +101,7 @@ fun LiquidBottomTabs(val isLtr = LocalLayoutDirection.current == LayoutDirection.Ltrval animationScope = rememberCoroutineScope()- val selectedTabIndexState = rememberUpdatedState(selectedTabIndex)- var currentIndex by remember {+ var currentIndex by remember(selectedTabIndex) {mutableIntStateOf(selectedTabIndex())}val dampedDragAnimation = remember(animationScope) {@@ -135,8 +135,8 @@ fun LiquidBottomTabs(})}- LaunchedEffect(Unit) {- snapshotFlow { selectedTabIndexState.value() }+ LaunchedEffect(selectedTabIndex) {+ snapshotFlow { selectedTabIndex() }.collectLatest { index ->currentIndex = index}