Browse Source

Rename getOptions to parseNodeOptions

Guy Carmeli 6 years ago
parent
commit
25574e6c3d

+ 8
- 8
lib/android/app/src/main/java/com/reactnativenavigation/parse/LayoutFactory.java View File

@@ -72,7 +72,7 @@ public class LayoutFactory {
72 72
 	}
73 73
 
74 74
     private ViewController createSideMenuRoot(LayoutNode node) {
75
-        SideMenuController sideMenuController = new SideMenuController(activity, node.id, getOptions(node));
75
+        SideMenuController sideMenuController = new SideMenuController(activity, node.id, parseNodeOptions(node));
76 76
 		for (LayoutNode child : node.children) {
77 77
 			ViewController childController = create(child);
78 78
             childController.setParentController(sideMenuController);
@@ -112,7 +112,7 @@ public class LayoutFactory {
112 112
                 id,
113 113
                 name,
114 114
                 new ComponentViewCreator(reactInstanceManager),
115
-                getOptions(node)
115
+                parseNodeOptions(node)
116 116
         );
117 117
 	}
118 118
 
@@ -123,7 +123,7 @@ public class LayoutFactory {
123 123
                 externalComponent,
124 124
                 externalComponentCreators.get(externalComponent.name.get()),
125 125
                 reactInstanceManager,
126
-                getOptions(node)
126
+                parseNodeOptions(node)
127 127
         );
128 128
     }
129 129
 
@@ -134,7 +134,7 @@ public class LayoutFactory {
134 134
                 .setTopBarBackgroundViewController(new TopBarBackgroundViewController(activity, new TopBarBackgroundViewCreator(reactInstanceManager)))
135 135
                 .setTopBarController(new TopBarController())
136 136
                 .setId(node.id)
137
-                .setInitialOptions(getOptions(node))
137
+                .setInitialOptions(parseNodeOptions(node))
138 138
                 .createStackController();
139 139
         addChildrenToStack(node.children, stackController);
140 140
         return stackController;
@@ -147,7 +147,7 @@ public class LayoutFactory {
147 147
     }
148 148
 
149 149
     private ViewController createBottomTabs(LayoutNode node) {
150
-        final BottomTabsController tabsComponent = new BottomTabsController(activity, eventEmitter, new ImageLoader(), node.id, getOptions(node));
150
+        final BottomTabsController tabsComponent = new BottomTabsController(activity, eventEmitter, new ImageLoader(), node.id, parseNodeOptions(node));
151 151
 		List<ViewController> tabs = new ArrayList<>();
152 152
 		for (int i = 0; i < node.children.size(); i++) {
153 153
             tabs.add(create(node.children.get(i)));
@@ -160,14 +160,14 @@ public class LayoutFactory {
160 160
         final List<ViewController> tabs = new ArrayList<>();
161 161
         for (int i = 0; i < node.children.size(); i++) {
162 162
             ViewController tabController = create(node.children.get(i));
163
-            Options options = getOptions(node.children.get(i));
163
+            Options options = parseNodeOptions(node.children.get(i));
164 164
             options.setTopTabIndex(i);
165 165
             tabs.add(tabController);
166 166
         }
167
-        return new TopTabsController(activity, node.id, tabs, new TopTabsLayoutCreator(activity, tabs), getOptions(node));
167
+        return new TopTabsController(activity, node.id, tabs, new TopTabsLayoutCreator(activity, tabs), parseNodeOptions(node));
168 168
     }
169 169
 
170
-    private Options getOptions(LayoutNode node) {
170
+    private Options parseNodeOptions(LayoutNode node) {
171 171
         return Options.parse(typefaceManager, node.getNavigationOptions(), defaultOptions);
172 172
     }
173 173
 }