Fix detaching views rendered under header config component. (#282)

This change fixes the problem when header update would get triggered while the header config subviews are not yet fully unmounted. The root cause of this problem is kind of a mystery, I encouneter a crash when going back using back button from a screen that have custom back button image rendered. Turned out that after implementing removeAll schema the problem no longer occurs. I didn't have enough time to investigate it further but supporting removeAll schema is an improvement regardless so going with this solution for now.
This commit is contained in:
Krzysztof Magiera
2020-01-14 18:28:19 +01:00
committed by GitHub
parent 28f57240c2
commit 1ac742610b
5 changed files with 29 additions and 0 deletions

View File

@@ -32,6 +32,11 @@ public class ScreenStackHeaderConfigViewManager extends ViewGroupManager<ScreenS
parent.addConfigSubview((ScreenStackHeaderSubview) child, index);
}
@Override
public void removeAllViews(ScreenStackHeaderConfig parent) {
parent.removeAllConfigSubviews();
}
@Override
public void removeViewAt(ScreenStackHeaderConfig parent, int index) {
parent.removeConfigSubview(index);