diff --git a/README.md b/README.md index 14a0c5d..636f243 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,10 @@ It provides commonly-reused utilities, including: * Composable Flow utilities * A plethora of Jetpack Compose functions * Jetpack Compose "remember" functions for system services, like sensors and time +* Compose layout utils (grids, etc.) * QR generation components -* Version-agnostic support for Java 1.8 Collection & Map features under Kotlin +* Mjpeg streams, among other types of streams for Compose +* Version-agnostic support for Java 1.8 Collection & Map features under Kotlin WITHOUT desugaring * And more! For more info, check out the JavaDoc at one of the links below: diff --git a/compose/src/main/java/xyz/regulad/regulib/compose/components/grid.kt b/compose/src/main/java/xyz/regulad/regulib/compose/components/grid.kt index 8e0ff12..e02cdc6 100644 --- a/compose/src/main/java/xyz/regulad/regulib/compose/components/grid.kt +++ b/compose/src/main/java/xyz/regulad/regulib/compose/components/grid.kt @@ -24,6 +24,7 @@ import kotlin.math.sqrt * This DynamicGridLayout, the [DynamicColumnRowGridLayout], creates columns containing rows. For certain use cases, like 9:16 video, [DynamicRowColumnGridLayout] may be more appropriate. */ @Composable +@Suppress("Unused") fun DynamicColumnRowGridLayout( modifier: Modifier = Modifier, items: List, @@ -110,6 +111,7 @@ fun DynamicColumnRowGridLayout( * This DynamicGridLayout, the [DynamicRowColumnGridLayout], creates rows containing columns. For certain use cases, like 16:9 video, [DynamicColumnRowGridLayout] may be more appropriate. */ @Composable +@Suppress("Unused") fun DynamicRowColumnGridLayout( modifier: Modifier = Modifier, items: List, diff --git a/compose/src/main/java/xyz/regulad/regulib/compose/components/qr.kt b/compose/src/main/java/xyz/regulad/regulib/compose/components/qr.kt index 0323d85..fc01f4a 100644 --- a/compose/src/main/java/xyz/regulad/regulib/compose/components/qr.kt +++ b/compose/src/main/java/xyz/regulad/regulib/compose/components/qr.kt @@ -17,6 +17,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @Composable +@Suppress("Unused") fun ByteQRCode( bytes: ByteArray, size: Pair = Pair(300, 300), diff --git a/compose/src/main/java/xyz/regulad/regulib/compose/navigation.kt b/compose/src/main/java/xyz/regulad/regulib/compose/navigation.kt index bf662a3..d2e56f7 100644 --- a/compose/src/main/java/xyz/regulad/regulib/compose/navigation.kt +++ b/compose/src/main/java/xyz/regulad/regulib/compose/navigation.kt @@ -3,6 +3,7 @@ package xyz.regulad.regulib.compose import androidx.navigation.NavController import androidx.navigation.NavOptionsBuilder +@Suppress("Unused") private val NavController.withoutHistory: NavOptionsBuilder.() -> Unit get() = fun NavOptionsBuilder.() { popUpTo(this@withoutHistory.graph.startDestinationId) { @@ -11,6 +12,7 @@ private val NavController.withoutHistory: NavOptionsBuilder.() -> Unit launchSingleTop = true } +@Suppress("Unused") fun NavController.navigateWithoutHistory(route: String) { this.navigate(route, withoutHistory) } diff --git a/compose/src/main/java/xyz/regulad/regulib/compose/sensor.kt b/compose/src/main/java/xyz/regulad/regulib/compose/sensor.kt index 0b3d4a9..2013d28 100644 --- a/compose/src/main/java/xyz/regulad/regulib/compose/sensor.kt +++ b/compose/src/main/java/xyz/regulad/regulib/compose/sensor.kt @@ -110,7 +110,7 @@ fun rememberSensorState(sensorType: Int): State { @Preview @Composable -fun SensorStatePreview() { +private fun SensorStatePreview() { Column { val accelerometerState by rememberSensorState(Sensor.TYPE_ACCELEROMETER) diff --git a/compose/src/main/java/xyz/regulad/regulib/compose/viewState.kt b/compose/src/main/java/xyz/regulad/regulib/compose/viewState.kt index a55b135..2838692 100644 --- a/compose/src/main/java/xyz/regulad/regulib/compose/viewState.kt +++ b/compose/src/main/java/xyz/regulad/regulib/compose/viewState.kt @@ -145,7 +145,7 @@ fun rememberContextIsImmersive(): State { @RequiresApi(Build.VERSION_CODES.M) @Preview @Composable -fun ImmersiveFullscreenContentPreview() { +private fun ImmersiveFullscreenContentPreview() { val durationSinceComposition by rememberDurationSinceComposition() if (durationSinceComposition == null) return