Skip to content

Commit c43e82d

Browse files
committed
fix: notify state update only once
1 parent aece063 commit c43e82d

File tree

1 file changed

+4
-2
lines changed
  • packages/brownie/android/src/main/java/com/callstack/brownie

1 file changed

+4
-2
lines changed

packages/brownie/android/src/main/java/com/callstack/brownie/Store.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class Store<State>(
4545
}
4646

4747
/**
48-
* Updates state with [updater], pushes it to C++, then notifies local subscribers.
48+
* Updates state with [updater] and pushes it to C++.
49+
*
50+
* Listener notification is triggered via the native storeDidChange callback and [rebuildState]
51+
* to keep Kotlin updates consistent with cross-runtime updates.
4952
*/
5053
fun set(updater: (State) -> State) {
5154
val newState =
@@ -55,7 +58,6 @@ class Store<State>(
5558
}
5659

5760
pushStateToCxx(newState)
58-
notifyListeners(newState)
5961
}
6062

6163
/**

0 commit comments

Comments
 (0)