Fix: make gh action use 6GB of RAM, remove small issue with navbar fix
This commit is contained in:
@@ -100,9 +100,9 @@ import kotlin.math.PI
|
|||||||
import kotlin.math.sin
|
import kotlin.math.sin
|
||||||
|
|
||||||
@OptIn(
|
@OptIn(
|
||||||
ExperimentalMaterial3Api::class,
|
ExperimentalMaterial3Api::class,
|
||||||
ExperimentalFoundationApi::class,
|
ExperimentalFoundationApi::class,
|
||||||
ExperimentalLayoutApi::class,
|
ExperimentalLayoutApi::class,
|
||||||
androidx.compose.animation.ExperimentalAnimationApi::class
|
androidx.compose.animation.ExperimentalAnimationApi::class
|
||||||
)
|
)
|
||||||
class Navigation(
|
class Navigation(
|
||||||
@@ -212,10 +212,10 @@ class Navigation(
|
|||||||
val density = androidx.compose.ui.platform.LocalDensity.current
|
val density = androidx.compose.ui.platform.LocalDensity.current
|
||||||
val selectedIndex = remember(currentRoute, selectedRoutes) {
|
val selectedIndex = remember(currentRoute, selectedRoutes) {
|
||||||
val index = selectedRoutes.indexOf(currentRoute)
|
val index = selectedRoutes.indexOf(currentRoute)
|
||||||
if (index >= 0) index else null
|
if (index >= 0) index else null // indexOf returns -1 when not found, replace with null
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedIndex?.let {
|
selectedIndex?.let { // Null check
|
||||||
val itemWidthPx =
|
val itemWidthPx =
|
||||||
remember(barWidthPx, itemCount) { if (itemCount > 0) barWidthPx / itemCount else 0f }
|
remember(barWidthPx, itemCount) { if (itemCount > 0) barWidthPx / itemCount else 0f }
|
||||||
val offsetAnim = remember { Animatable(0f) }
|
val offsetAnim = remember { Animatable(0f) }
|
||||||
@@ -507,9 +507,9 @@ class Navigation(
|
|||||||
val children = routes.getRoutes().filter { it.parentRoute == route }
|
val children = routes.getRoutes().filter { it.parentRoute == route }
|
||||||
if (children.isEmpty()) {
|
if (children.isEmpty()) {
|
||||||
val isSummaryScreen = route.routeInfo.id == Routes.CONFIG_IMPORT_CONFIRMATION_ROUTE ||
|
val isSummaryScreen = route.routeInfo.id == Routes.CONFIG_IMPORT_CONFIRMATION_ROUTE ||
|
||||||
route.routeInfo.id == Routes.CONFIG_EXPORT_SUMMARY_ROUTE ||
|
route.routeInfo.id == Routes.CONFIG_EXPORT_SUMMARY_ROUTE ||
|
||||||
route.routeInfo.id == Routes.FRIEND_TRACKER_CONFIG_EXPORT_ROUTE ||
|
route.routeInfo.id == Routes.FRIEND_TRACKER_CONFIG_EXPORT_ROUTE ||
|
||||||
route.routeInfo.id == Routes.FRIEND_TRACKER_CONFIG_IMPORT_ROUTE
|
route.routeInfo.id == Routes.FRIEND_TRACKER_CONFIG_IMPORT_ROUTE
|
||||||
val isAddRuleScreen = route.routeInfo.id.startsWith("edit_rule")
|
val isAddRuleScreen = route.routeInfo.id.startsWith("edit_rule")
|
||||||
val animatedRoutes = setOf("friend_tracker_catalog", "manage_friend_tracker_repos", "manage_script_repos", "manage_repos")
|
val animatedRoutes = setOf("friend_tracker_catalog", "manage_friend_tracker_repos", "manage_script_repos", "manage_repos")
|
||||||
val isAnimatedRoute = animatedRoutes.contains(route.routeInfo.id)
|
val isAnimatedRoute = animatedRoutes.contains(route.routeInfo.id)
|
||||||
@@ -570,4 +570,4 @@ class Navigation(
|
|||||||
|
|
||||||
@Composable fun FloatingActionButton() = Fab()
|
@Composable fun FloatingActionButton() = Fab()
|
||||||
@Composable fun Content(paddingValues: PaddingValues, startDestination: String) = NavContent(paddingValues, startDestination)
|
@Composable fun Content(paddingValues: PaddingValues, startDestination: String) = NavContent(paddingValues, startDestination)
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xms12G -Xmx12G -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xms6G -Xmx6G -Dfile.encoding=UTF-8
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|||||||
Reference in New Issue
Block a user