File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -186,10 +186,13 @@ internal class DialogCollator {
186
186
onSessionsUpdated : (List <DialogSession >) -> Unit
187
187
) {
188
188
check(expectedUpdates > 0 ) {
189
- " Each update () call must be preceded by a call to ViewEnvironment.establishDialogCollator, " +
190
- " but expectedUpdates is $expectedUpdates "
189
+ " Each scheduleUpdates () call must be preceded by a call to" +
190
+ " ViewEnvironment.establishDialogCollator, but expectedUpdates is $expectedUpdates "
191
191
}
192
192
193
+ // Under nested ComposeView instances we may get redundant updates from the
194
+ // same caller. Just throw away the upstream ones.
195
+ this .allUpdates.removeAll { it.id == id }
193
196
this .allUpdates.add(IdAndUpdates (id, updates, onSessionsUpdated))
194
197
if (-- expectedUpdates == 0 ) doUpdate()
195
198
}
You can’t perform that action at this time.
0 commit comments