@momo-kits/native-kits 0.161.2-nativeimage.2-debug → 0.161.2-nativeimage.3-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.161.2-nativeimage.2-debug"
43
+ version = "0.161.2-nativeimage.3-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -48,6 +48,9 @@ actual fun BoxScope.NativeImageWrapper(
48
48
  SDAnimatedImageView().apply {
49
49
  shouldCustomLoopCount = false
50
50
  shouldIncrementalLoad = true
51
+ // Free decoded frame buffers as soon as animation stops,
52
+ // important when many GIFs churn through a list.
53
+ clearBufferWhenStopped = true
51
54
  }
52
55
  } else {
53
56
  UIImageView()
@@ -84,7 +87,13 @@ actual fun BoxScope.NativeImageWrapper(
84
87
 
85
88
 
86
89
  DisposableEffect(Unit) {
87
- onDispose { imageView.sd_cancelCurrentImageLoad() }
90
+ onDispose {
91
+ // Cancel the download and release the decoded image / frame
92
+ // buffers now, rather than waiting for the view to deallocate.
93
+ imageView.sd_cancelCurrentImageLoad()
94
+ imageView.stopAnimating()
95
+ imageView.image = null
96
+ }
88
97
  }
89
98
 
90
99
  LaunchedEffect(Unit) {
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.161.2-nativeimage.2
21
+ version=0.161.2-nativeimage.3
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.161.2-nativeimage.2-debug",
3
+ "version": "0.161.2-nativeimage.3-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},