build(deps): Kotlin 2.4.20, Compose BOM 2026.09, material3 alpha28, navigation 2.10
Жест назад ведёт тот же shared-axis, что и кнопка: дефолт 2.10 - scaleOut(0.7).
This commit is contained in:
1 parent
7ab921c667
commit
8abeeb70b3
3 files changed
+28
-22
No files matched your search
@@ -18,7 +18,7 @@ import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
|
||||
import androidx.compose.material3.adaptive.currentWindowAdaptiveInfoV2
|
||||
import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteItem
|
||||
import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffold
|
||||
import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffoldDefaults
|
||||
@@ -107,7 +107,7 @@ fun AppNavigation(
|
||||
}
|
||||
|
||||
val suiteType = NavigationSuiteScaffoldDefaults
|
||||
.navigationSuiteType(currentWindowAdaptiveInfo())
|
||||
.navigationSuiteType(currentWindowAdaptiveInfoV2())
|
||||
|
||||
val context = LocalContext.current
|
||||
|
||||
@@ -222,16 +222,12 @@ private fun AppNavHost(
|
||||
}
|
||||
}
|
||||
},
|
||||
popEnterTransition = {
|
||||
if (reducedMotion) EnterTransition.None
|
||||
else fadeIn(tween(NAV_FADE_IN_MS, easing = EmphasizedEasing)) +
|
||||
slideInHorizontally(tween(NAV_SLIDE_MS, easing = EmphasizedEasing)) { -it / 5 }
|
||||
},
|
||||
popExitTransition = {
|
||||
if (reducedMotion) ExitTransition.None
|
||||
else fadeOut(tween(NAV_FADE_OUT_MS, easing = EmphasizedEasing)) +
|
||||
slideOutHorizontally(tween(NAV_SLIDE_MS, easing = EmphasizedEasing)) { it / 12 }
|
||||
}
|
||||
popEnterTransition = { popEnter(reducedMotion) },
|
||||
popExitTransition = { popExit(reducedMotion) },
|
||||
// Дефолт navigation 2.10 для жеста назад - scaleOut(0.7): экран "проваливается".
|
||||
// Жест ведёт тот же shared-axis, что и кнопка назад.
|
||||
predictivePopEnterTransition = { popEnter(reducedMotion) },
|
||||
predictivePopExitTransition = { popExit(reducedMotion) }
|
||||
) {
|
||||
homeGraph(navController, settingsViewModel, serverConfigViewModel, proxyViewModel)
|
||||
logsGraph(proxyViewModel)
|
||||
@@ -241,6 +237,16 @@ private fun AppNavHost(
|
||||
}
|
||||
}
|
||||
|
||||
private fun popEnter(reducedMotion: Boolean): EnterTransition =
|
||||
if (reducedMotion) EnterTransition.None
|
||||
else fadeIn(tween(NAV_FADE_IN_MS, easing = EmphasizedEasing)) +
|
||||
slideInHorizontally(tween(NAV_SLIDE_MS, easing = EmphasizedEasing)) { -it / 5 }
|
||||
|
||||
private fun popExit(reducedMotion: Boolean): ExitTransition =
|
||||
if (reducedMotion) ExitTransition.None
|
||||
else fadeOut(tween(NAV_FADE_OUT_MS, easing = EmphasizedEasing)) +
|
||||
slideOutHorizontally(tween(NAV_SLIDE_MS, easing = EmphasizedEasing)) { it / 12 }
|
||||
|
||||
private val tabOrder = listOf(
|
||||
HomeGraph::class, LogsGraph::class, ShareGraph::class, SettingsGraph::class, AddGraph::class
|
||||
)
|
||||
@@ -272,6 +278,7 @@ private fun TelegramSubscribeDialog(onSubscribe: () -> Unit, onDismiss: () -> Un
|
||||
text = { Text(stringResource(R.string.tg_subscribe_desc)) },
|
||||
confirmButton = {
|
||||
TextButton(
|
||||
shapes = ButtonDefaults.shapes(),
|
||||
onClick = onSubscribe,
|
||||
colors = ButtonDefaults.textButtonColors(
|
||||
contentColor = MaterialTheme.colorScheme.primary
|
||||
@@ -279,7 +286,7 @@ private fun TelegramSubscribeDialog(onSubscribe: () -> Unit, onDismiss: () -> Un
|
||||
) { Text(stringResource(R.string.tg_subscribe_btn)) }
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismiss) { Text(stringResource(R.string.tg_not_now)) }
|
||||
TextButton(shapes = ButtonDefaults.shapes(), onClick = onDismiss) { Text(stringResource(R.string.tg_not_now)) }
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ internal fun AppList(
|
||||
items(filtered, key = { it.packageName }) { app ->
|
||||
val checked = app.packageName in selected
|
||||
ListItem(
|
||||
headlineContent = { Text(app.label) },
|
||||
supportingContent = {
|
||||
Text(app.packageName, style = MaterialTheme.typography.labelSmall)
|
||||
},
|
||||
@@ -86,7 +85,7 @@ internal fun AppList(
|
||||
role = Role.Checkbox,
|
||||
onValueChange = { onToggle(app.packageName) }
|
||||
)
|
||||
)
|
||||
) { Text(app.label) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
[versions]
|
||||
agp = "9.1.1"
|
||||
kotlin = "2.4.10"
|
||||
kotlin = "2.4.20"
|
||||
coreKtx = "1.19.0"
|
||||
activity = "1.13.0"
|
||||
composeBom = "2026.08.00"
|
||||
material3 = "1.5.0-alpha26"
|
||||
navigationCompose = "2.9.8"
|
||||
composeBom = "2026.09.00"
|
||||
material3 = "1.5.0-alpha28"
|
||||
navigationCompose = "2.10.1"
|
||||
datastorePreferences = "1.2.1"
|
||||
lifecycleViewmodelCompose = "2.11.0"
|
||||
coreSplashscreen = "1.2.0"
|
||||
jsch = "2.28.6"
|
||||
jsch = "2.28.7"
|
||||
coroutinesAndroid = "1.11.0"
|
||||
bouncycastle = "1.85.2"
|
||||
bouncycastle = "1.86"
|
||||
koin = "4.2.2"
|
||||
desugarJdkLibs = "2.1.5"
|
||||
camerax = "1.6.1"
|
||||
camerax = "1.6.2"
|
||||
mlkitBarcode = "17.3.0"
|
||||
zxingCore = "3.5.4"
|
||||
junit = "4.13.2"
|
||||
|
||||
Reference in new issue
Block a user