mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 19:44:13 +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,19 +129,11 @@ public class ReactFindViewUtil {
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<Map.Entry<OnMultipleViewsFoundListener, Set<String>>>
|
||||
viewIterator = mOnMultipleViewsFoundListener.entrySet().iterator();
|
||||
while (viewIterator.hasNext()) {
|
||||
Map.Entry<OnMultipleViewsFoundListener, Set<String>> entry =
|
||||
viewIterator.next();
|
||||
Set<String> nativeIds = entry.getValue();
|
||||
if (nativeIds.contains(nativeId)) {
|
||||
entry.getKey().onViewFound(view, nativeId);
|
||||
nativeIds.remove(nativeId); // remove it from list of NativeIds to search for.
|
||||
}
|
||||
if (nativeIds.isEmpty()) {
|
||||
viewIterator.remove();
|
||||
}
|
||||
for (Map.Entry<OnMultipleViewsFoundListener, Set<String>> entry : mOnMultipleViewsFoundListener.entrySet()) {
|
||||
Set<String> nativeIds = entry.getValue();
|
||||
if (nativeIds != null && nativeIds.contains(nativeId)) {
|
||||
entry.getKey().onViewFound(view, nativeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user