|
@@ -16,6 +16,8 @@ import com.reactnativenavigation.views.Component;
|
16
|
16
|
|
17
|
17
|
import java.util.Collection;
|
18
|
18
|
|
|
19
|
+import static com.reactnativenavigation.utils.CollectionUtils.forEach;
|
|
20
|
+
|
19
|
21
|
public abstract class ParentController<T extends ViewGroup> extends ChildController {
|
20
|
22
|
|
21
|
23
|
public ParentController(Activity activity, ChildControllersRegistry childRegistry, String id, Presenter presenter, Options initialOptions) {
|
|
@@ -31,12 +33,7 @@ public abstract class ParentController<T extends ViewGroup> extends ChildControl
|
31
|
33
|
@Override
|
32
|
34
|
public void setDefaultOptions(Options defaultOptions) {
|
33
|
35
|
super.setDefaultOptions(defaultOptions);
|
34
|
|
- Collection<? extends ViewController> children = getChildControllers();
|
35
|
|
- if (!CollectionUtils.isNullOrEmpty(children)) {
|
36
|
|
- for (ViewController child : children) {
|
37
|
|
- child.setDefaultOptions(defaultOptions);
|
38
|
|
- }
|
39
|
|
- }
|
|
36
|
+ forEach(getChildControllers(), (child) -> child.setDefaultOptions(defaultOptions));
|
40
|
37
|
}
|
41
|
38
|
|
42
|
39
|
@Override
|