File tree Expand file tree Collapse file tree
appleMain/kotlin/dev/icerock/moko/resources/compose
iosMain/kotlin/dev/icerock/moko/resources/compose
macosMain/kotlin/dev/icerock/moko/resources/compose Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ buildscript {
6565 }
6666
6767 dependencies {
68- classpath "dev.icerock.moko:resources-generator:0.25.1 "
68+ classpath "dev.icerock.moko:resources-generator:0.25.2 "
6969 }
7070}
7171
@@ -84,9 +84,9 @@ apply plugin: "dev.icerock.mobile.multiplatform-resources"
8484
8585dependencies {
8686 commonMainApi("dev.icerock.moko:resources:0.25.1")
87- commonMainApi("dev.icerock.moko:resources-compose:0.25.1 ") // for compose multiplatform
87+ commonMainApi("dev.icerock.moko:resources-compose:0.25.2 ") // for compose multiplatform
8888
89- commonTestImplementation("dev.icerock.moko:resources-test:0.25.1 ")
89+ commonTestImplementation("dev.icerock.moko:resources-test:0.25.2 ")
9090}
9191
9292multiplatformResources {
Original file line number Diff line number Diff line change 11[versions ]
2- resourcesVersion = " 0.25.1 "
2+ resourcesVersion = " 0.25.2 "
33
44[libraries ]
55resources = { module = " dev.icerock.moko:resources" , version.ref = " resourcesVersion" }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import dev.icerock.moko.resources.AssetResource
1111
1212@Composable
1313actual fun AssetResource.readTextAsState (): State <String ?> {
14- return produceState<String ?>(null ) {
14+ return produceState<String ?>(null , this ) {
1515 value = readText()
1616 }
1717}
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ import platform.UIKit.UIColor
2222@OptIn(ExperimentalForeignApi ::class )
2323@Composable
2424actual fun colorResource (resource : ColorResource ): Color {
25- // TODO https://github.com/icerockdev/moko-resources/issues/443
26- // recompose when appearance changed (now not works in runtime!)
2725 val darkMode: Boolean = isSystemInDarkTheme()
2826 return remember(resource, darkMode) {
2927 val uiColor: UIColor = resource.getUIColor()
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ import platform.AppKit.NSColorSpace.Companion.deviceRGBColorSpace
1515
1616@Composable
1717actual fun colorResource (resource : ColorResource ): Color {
18- // TODO https://github.com/icerockdev/moko-resources/issues/443
19- // recompose when appearance changed (now not works in runtime!)
2018 val darkMode: Boolean = isSystemInDarkTheme()
2119 return remember(resource, darkMode) {
2220 val nsColor: NSColor = resource.getNSColor()
You can’t perform that action at this time.
0 commit comments