Quellcode durchsuchen

Minor code style fixes.

Removed propTypes from example-redux screens
Guy Carmeli vor 8 Jahren
Ursprung
Commit
6412a29029

+ 7
- 10
android/app/src/main/java/com/reactnativenavigation/activities/BottomTabActivity.java Datei anzeigen

@@ -94,7 +94,6 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
94 94
         }
95 95
     }
96 96
 
97
-
98 97
     @Override
99 98
     public boolean onCreateOptionsMenu(Menu menu) {
100 99
         boolean ret = super.onCreateOptionsMenu(menu);
@@ -142,23 +141,21 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
142 141
         setNavigationStyle(mScreenStacks.get(mCurrentStackPosition).peek());
143 142
     }
144 143
 
145
-
146 144
     private static class SetupTabsTask extends AsyncTask<Void, Void, Map<Screen, Drawable>> {
147
-
148
-        private BottomTabActivity activity;
149
-        private ArrayList<Screen> screens;
145
+        private BottomTabActivity mActivity;
146
+        private ArrayList<Screen> mScreens;
150 147
 
151 148
         public SetupTabsTask(BottomTabActivity context, ArrayList<Screen> screens) {
152
-            this.activity = context;
153
-            this.screens = screens;
149
+            mActivity = context;
150
+            mScreens = screens;
154 151
         }
155 152
 
156 153
         @Override
157 154
         protected Map<Screen, Drawable> doInBackground(Void... params) {
158 155
             Map<Screen, Drawable> icons = new HashMap<>();
159
-            for (Screen screen : this.screens) {
156
+            for (Screen screen : mScreens) {
160 157
                 if (screen.icon != null) {
161
-                    icons.put(screen, screen.getIcon(this.activity));
158
+                    icons.put(screen, screen.getIcon(this.mActivity));
162 159
                 }
163 160
             }
164 161
             return icons;
@@ -166,7 +163,7 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
166 163
 
167 164
         @Override
168 165
         protected void onPostExecute(Map<Screen, Drawable> icons) {
169
-            activity.setTabsWithIcons(this.screens, icons);
166
+            mActivity.setTabsWithIcons(mScreens, icons);
170 167
         }
171 168
     }
172 169
 

+ 0
- 1
android/app/src/main/java/com/reactnativenavigation/modules/RctActivityModule.java Datei anzeigen

@@ -13,7 +13,6 @@ import com.facebook.react.bridge.ReadableNativeMap;
13 13
 import com.reactnativenavigation.activities.BaseReactActivity;
14 14
 import com.reactnativenavigation.activities.BottomTabActivity;
15 15
 import com.reactnativenavigation.activities.SingleScreenActivity;
16
-import com.reactnativenavigation.activities.TabActivity;
17 16
 import com.reactnativenavigation.controllers.ModalController;
18 17
 import com.reactnativenavigation.core.objects.Screen;
19 18
 import com.reactnativenavigation.modal.RnnModal;

+ 0
- 2
android/app/src/main/java/com/reactnativenavigation/utils/IconUtils.java Datei anzeigen

@@ -15,8 +15,6 @@ import java.net.URL;
15 15
  * Created by yedidyak on 29/05/2016.
16 16
  */
17 17
 public class IconUtils {
18
-
19
-
20 18
     public static final String LOCAL_RESOURCE_URI_SCHEME = "res";
21 19
     private static ResourceDrawableIdHelper sResDrawableIdHelper = new ResourceDrawableIdHelper();
22 20
 

+ 0
- 6
example-redux/src/screens/FirstTabScreen.js Datei anzeigen

@@ -37,12 +37,6 @@ class FirstTabScreen extends Component {
37 37
     ]
38 38
   };
39 39
 
40
-  static propTypes = {
41
-    str: PropTypes.string.isRequired,
42
-    obj: PropTypes.object.isRequired,
43
-    num: PropTypes.number.isRequired
44
-  };
45
-
46 40
   constructor(props) {
47 41
     super(props);
48 42
     // if you want to listen on navigator events, set this up

+ 0
- 6
example-redux/src/screens/SecondTabScreen.js Datei anzeigen

@@ -19,12 +19,6 @@ class SecondTabScreen extends Component {
19 19
     navBarTranslucent: true
20 20
   };
21 21
 
22
-  static propTypes = {
23
-    str: PropTypes.string.isRequired,
24
-    obj: PropTypes.object.isRequired,
25
-    num: PropTypes.number.isRequired
26
-  };
27
-
28 22
   constructor(props) {
29 23
     super(props);
30 24
     this.buttonsCounter = 0;