@momo-kits/native-kits 0.162.42-debug → 0.162.43-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/compose/build.gradle.kts
CHANGED
|
@@ -19,6 +19,7 @@ import coil3.request.ImageRequest
|
|
|
19
19
|
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
20
20
|
import vn.momo.kits.const.AppTheme
|
|
21
21
|
import vn.momo.kits.const.Colors
|
|
22
|
+
import vn.momo.kits.gifimage.GifImage
|
|
22
23
|
import vn.momo.kits.modifier.conditional
|
|
23
24
|
import vn.momo.kits.utils.Icons
|
|
24
25
|
import vn.momo.kits.utils.noThemeIcons
|
|
@@ -59,18 +60,27 @@ fun Icon(
|
|
|
59
60
|
}
|
|
60
61
|
.semantics { contentDescription = contentDesc }
|
|
61
62
|
) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
if (isGifUrl(iconUrl)) {
|
|
64
|
+
GifImage(
|
|
65
|
+
modifier = Modifier.matchParentSize(),
|
|
66
|
+
url = iconUrl,
|
|
67
|
+
contentDescription = null,
|
|
68
|
+
contentScale = ContentScale.Fit,
|
|
69
|
+
)
|
|
70
|
+
} else {
|
|
71
|
+
AsyncImage(
|
|
72
|
+
modifier = Modifier.matchParentSize(),
|
|
73
|
+
model = ImageRequest.Builder(context)
|
|
74
|
+
.data(iconUrl)
|
|
75
|
+
.size(
|
|
76
|
+
coil3.size.Dimension.Undefined,
|
|
77
|
+
coil3.size.Dimension.Undefined
|
|
78
|
+
)
|
|
79
|
+
.build(),
|
|
80
|
+
contentDescription = null,
|
|
81
|
+
contentScale = ContentScale.Fit,
|
|
82
|
+
colorFilter = colorFilter,
|
|
83
|
+
)
|
|
84
|
+
}
|
|
75
85
|
}
|
|
76
86
|
}
|
|
@@ -77,7 +77,7 @@ private fun getHostFromUrl(url: String): String? {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
internal fun isGifUrl(url: String): Boolean {
|
|
81
81
|
val path = url.substringBefore('#').substringBefore('?')
|
|
82
82
|
return path.endsWith(".gif", ignoreCase = true)
|
|
83
83
|
}
|
package/gradle.properties
CHANGED