Skip to content

Commit

Permalink
fix kotlin 2.1.0 data class warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Dec 24, 2024
1 parent 5923136 commit 46f2f7f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ androidCompileSdk = "35"

jvmTarget = "17"

libVersion = "3.2.6"
libVersion = "3.2.7"

kotlin = "2.1.0"
agp = "8.7.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.t8rin.collages

import com.t8rin.collages.model.TemplateItem

@ConsistentCopyVisibility
data class CollageType internal constructor(
internal val templateItem: TemplateItem?,
internal val index: Int?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ object CropDefaults {
* is shared between ui and state.
*/
@Immutable
data class CropProperties internal constructor(
data class CropProperties(
val cropType: CropType,
val handleSize: Float,
val middleHandleSize: Float,
Expand All @@ -111,7 +111,7 @@ data class CropProperties internal constructor(
* by [CropState] or [Modifier.crop]
*/
@Immutable
data class CropStyle internal constructor(
data class CropStyle(
val drawOverlay: Boolean,
val drawGrid: Boolean,
val strokeWidth: Dp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.t8rin.curves.view.PhotoFilterCurvesControl.CurvesValue
import jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter
import jp.co.cyberagent.android.gpuimage.filter.GPUImageToneCurveFilter

@ConsistentCopyVisibility
data class ImageCurvesEditorState internal constructor(
internal val curvesToolValue: CurvesToolValue
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private fun ThumbnailLayoutImpl(

BoxWithConstraints(modifier) {

val canvasWidth = constraints.maxWidth.toFloat()
val canvasWidth = this.constraints.maxWidth.toFloat()
val canvasHeight = constraints.maxHeight.toFloat()

val thumbnailWidthInPx: Float
Expand Down Expand Up @@ -484,7 +484,7 @@ fun rememberThumbnailState(
}

@Immutable
data class ThumbnailState internal constructor(
data class ThumbnailState(
@Stable
val size: DpSize = DpSize(80.dp, 80.dp),
@Stable
Expand Down Expand Up @@ -533,7 +533,7 @@ fun Border(
}

@Immutable
data class Border internal constructor(
data class Border(
@Stable
val strokeWidth: Dp,
@Stable
Expand Down

0 comments on commit 46f2f7f

Please sign in to comment.