react-native-glance-chat 0.1.7 → 0.1.9

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.
@@ -9,7 +9,7 @@ buildscript {
9
9
  // example/android/settings.gradle and the README integration section. During local
10
10
  // development, publish with `./gradlew publishToMavenLocal -Psdk.version=1.0.0`
11
11
  // (produces 1.0.0-local) and set sdkVersion to "1.0.0-local" to resolve from mavenLocal().
12
- sdkVersion: "1.0.13"
12
+ sdkVersion: "1.0.15"
13
13
  ]
14
14
 
15
15
  ext.getExtOrDefault = { prop ->
@@ -75,14 +75,21 @@ class GlanceProductTryOnWidgetViewManager :
75
75
  private class WidgetHostLayout(context: ThemedReactContext) : FrameLayout(context) {
76
76
  private var composeView: ComposeView? = null
77
77
 
78
+ // Fabric commits every prop on each React render, changed or not. Without the
79
+ // equality guards below, each commit called renderContent() → setContent{},
80
+ // which tears down and recreates the Compose composition — resetting the pill's
81
+ // expand/contract animation state machine mid-cycle (first cycle fine, later
82
+ // cycles garbled).
78
83
  var variantId: String = ""
79
84
  set(value) {
85
+ if (field == value) return
80
86
  field = value
81
87
  if (isAttachedToWindow) renderContent()
82
88
  }
83
89
 
84
90
  var widgetEnabled: Boolean = true
85
91
  set(value) {
92
+ if (field == value) return
86
93
  field = value
87
94
  if (isAttachedToWindow) renderContent()
88
95
  }
@@ -90,6 +97,7 @@ class GlanceProductTryOnWidgetViewManager :
90
97
  /** 'end' (default) hugs the host's right edge; 'start' hugs the left. */
91
98
  var widgetAlign: String = "end"
92
99
  set(value) {
100
+ if (field == value) return
93
101
  field = value
94
102
  if (isAttachedToWindow) renderContent()
95
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-glance-chat",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "React Native wrapper for the Glance Chat SDK (Android + iOS)",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",