Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljohanneskraft committed Nov 19, 2024
1 parent 2207da9 commit c84e748
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ import javax.annotation.concurrent.Immutable

@Immutable
sealed interface AsyncImageResource {
val identifier: UUID
val identifier: String
val contentDescription: StringResource

data class Remote(
val url: String,
override val contentDescription: StringResource,
) : AsyncImageResource {
override val identifier: UUID = UUID()
override val identifier = UUID().toString()
}

data class Vector(
val image: ImageVector,
override val contentDescription: StringResource,
) : AsyncImageResource {
override val identifier: UUID = UUID()
override val identifier = UUID().toString()
}

data class Drawable(
@DrawableRes val resId: Int,
override val contentDescription: StringResource,
) : AsyncImageResource {
override val identifier: UUID = UUID()
override val identifier = UUID().toString()
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import javax.annotation.concurrent.Immutable
*/
@Immutable
sealed interface ImageResource {
val identifier: UUID
val identifier: String
val contentDescription: StringResource

data class Vector(
val image: ImageVector,
override val contentDescription: StringResource,
) : ImageResource {
override val identifier: UUID = UUID()
override val identifier = UUID().toString()
}

data class Drawable(
@DrawableRes val resId: Int,
override val contentDescription: StringResource,
) : ImageResource {
override val identifier: UUID = UUID()
override val identifier = UUID().toString()
}
}

0 comments on commit c84e748

Please sign in to comment.