Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
regulad committed Oct 24, 2024
1 parent f9798d2 commit c3c42e0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <T> DynamicColumnRowGridLayout(
modifier: Modifier = Modifier,
items: List<T>,
Expand Down Expand Up @@ -110,6 +111,7 @@ fun <T> 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 <T> DynamicRowColumnGridLayout(
modifier: Modifier = Modifier,
items: List<T>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

@Composable
@Suppress("Unused")
fun ByteQRCode(
bytes: ByteArray,
size: Pair<Int, Int> = Pair(300, 300),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -11,6 +12,7 @@ private val NavController.withoutHistory: NavOptionsBuilder.() -> Unit
launchSingleTop = true
}

@Suppress("Unused")
fun NavController.navigateWithoutHistory(route: String) {
this.navigate(route, withoutHistory)
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun rememberSensorState(sensorType: Int): State<SensorEventView?> {

@Preview
@Composable
fun SensorStatePreview() {
private fun SensorStatePreview() {
Column {
val accelerometerState by rememberSensorState(Sensor.TYPE_ACCELEROMETER)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fun rememberContextIsImmersive(): State<Boolean> {
@RequiresApi(Build.VERSION_CODES.M)
@Preview
@Composable
fun ImmersiveFullscreenContentPreview() {
private fun ImmersiveFullscreenContentPreview() {
val durationSinceComposition by rememberDurationSinceComposition()

if (durationSinceComposition == null) return
Expand Down

0 comments on commit c3c42e0

Please sign in to comment.