@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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.162.42-debug"
43
+ version = "0.162.43-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -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
- AsyncImage(
63
- modifier = Modifier.matchParentSize(),
64
- model = ImageRequest.Builder(context)
65
- .data(iconUrl)
66
- .size(
67
- coil3.size.Dimension.Undefined,
68
- coil3.size.Dimension.Undefined
69
- )
70
- .build(),
71
- contentDescription = null,
72
- contentScale = ContentScale.Fit,
73
- colorFilter = colorFilter,
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
- private fun isGifUrl(url: String): Boolean {
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
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.162.42
21
+ version=0.162.43
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.162.42-debug",
3
+ "version": "0.162.43-debug",
4
4
  "private": false,
5
5
  "dependeNavigationncies": {},
6
6
  "devDependencies": {},