mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
Keep nativeIDs immutable in ReactFindViewUtil
Reviewed By: mdvacca Differential Revision: D7430144 fbshipit-source-id: c8e8242c1c3216258e4b8c27623160338e2578d8
This commit is contained in:
parent
9bdc31069a
commit
ee0c69dfa6
@ -129,18 +129,10 @@ public class ReactFindViewUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<Map.Entry<OnMultipleViewsFoundListener, Set<String>>>
|
for (Map.Entry<OnMultipleViewsFoundListener, Set<String>> entry : mOnMultipleViewsFoundListener.entrySet()) {
|
||||||
viewIterator = mOnMultipleViewsFoundListener.entrySet().iterator();
|
|
||||||
while (viewIterator.hasNext()) {
|
|
||||||
Map.Entry<OnMultipleViewsFoundListener, Set<String>> entry =
|
|
||||||
viewIterator.next();
|
|
||||||
Set<String> nativeIds = entry.getValue();
|
Set<String> nativeIds = entry.getValue();
|
||||||
if (nativeIds.contains(nativeId)) {
|
if (nativeIds != null && nativeIds.contains(nativeId)) {
|
||||||
entry.getKey().onViewFound(view, nativeId);
|
entry.getKey().onViewFound(view, nativeId);
|
||||||
nativeIds.remove(nativeId); // remove it from list of NativeIds to search for.
|
|
||||||
}
|
|
||||||
if (nativeIds.isEmpty()) {
|
|
||||||
viewIterator.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user