Daniel Zlotin 7 years ago
parent
commit
1718798d7d

+ 12
- 3
android/app/src/main/java/com/reactnativenavigation/bridge/NavigationReactModule.java View File

@@ -8,10 +8,12 @@ import com.facebook.react.bridge.ReadableArray;
8 8
 import com.facebook.react.bridge.ReadableMap;
9 9
 import com.reactnativenavigation.controllers.NavigationCommandsHandler;
10 10
 import com.reactnativenavigation.params.ContextualMenuParams;
11
+import com.reactnativenavigation.params.FabParams;
11 12
 import com.reactnativenavigation.params.SnackbarParams;
12 13
 import com.reactnativenavigation.params.TitleBarButtonParams;
13 14
 import com.reactnativenavigation.params.TitleBarLeftButtonParams;
14 15
 import com.reactnativenavigation.params.parsers.ContextualMenuParamsParser;
16
+import com.reactnativenavigation.params.parsers.FabParamsParser;
15 17
 import com.reactnativenavigation.params.parsers.SnackbarParamsParser;
16 18
 import com.reactnativenavigation.params.parsers.TitleBarButtonParamsParser;
17 19
 import com.reactnativenavigation.params.parsers.TitleBarLeftButtonParamsParser;
@@ -70,15 +72,17 @@ public class NavigationReactModule extends ReactContextBaseJavaModule {
70 72
     }
71 73
 
72 74
     @ReactMethod
73
-    public void setScreenTitleBarButtons(String screenInstanceId, String navigatorEventId,
74
-                                         ReadableArray rightButtonsParams, ReadableMap leftButtonParams) {
75
+    public void setScreenButtons(String screenInstanceId, String navigatorEventId,
76
+                                 ReadableArray rightButtonsParams, ReadableMap leftButtonParams, ReadableMap fab) {
75 77
         if (rightButtonsParams != null) {
76 78
             setScreenTitleBarRightButtons(screenInstanceId, navigatorEventId, rightButtonsParams);
77 79
         }
78
-
79 80
         if (leftButtonParams != null) {
80 81
             setScreenTitleBarLeftButton(screenInstanceId, navigatorEventId, leftButtonParams);
81 82
         }
83
+        if (fab != null) {
84
+            setScreenFab(screenInstanceId, navigatorEventId, fab);
85
+        }
82 86
     }
83 87
 
84 88
     private void setScreenTitleBarRightButtons(String screenInstanceId, String navigatorEventId, ReadableArray rightButtonsParams) {
@@ -93,6 +97,11 @@ public class NavigationReactModule extends ReactContextBaseJavaModule {
93 97
         NavigationCommandsHandler.setScreenTitleBarLeftButtons(screenInstanceId, navigatorEventId, leftButton);
94 98
     }
95 99
 
100
+    private void setScreenFab(String screenInstanceId, String navigatorEventId, ReadableMap fab) {
101
+        FabParams fabParams = new FabParamsParser().parse(BundleConverter.toBundle(fab), navigatorEventId);
102
+        NavigationCommandsHandler.setScreenFab(screenInstanceId, navigatorEventId, fabParams);
103
+    }
104
+
96 105
     @ReactMethod
97 106
     public void setBottomTabBadgeByIndex(Integer index, String badge) {
98 107
         NavigationCommandsHandler.setBottomTabBadgeByIndex(index, badge);

+ 5
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java View File

@@ -24,6 +24,7 @@ import com.reactnativenavigation.layouts.LayoutFactory;
24 24
 import com.reactnativenavigation.params.ActivityParams;
25 25
 import com.reactnativenavigation.params.AppStyle;
26 26
 import com.reactnativenavigation.params.ContextualMenuParams;
27
+import com.reactnativenavigation.params.FabParams;
27 28
 import com.reactnativenavigation.params.ScreenParams;
28 29
 import com.reactnativenavigation.params.SnackbarParams;
29 30
 import com.reactnativenavigation.params.TitleBarButtonParams;
@@ -254,6 +255,10 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
254 255
         modalController.setTitleBarLeftButton(screenInstanceId, navigatorEventId, titleBarLeftButton);
255 256
     }
256 257
 
258
+    void setScreenFab(String screenInstanceId, String navigatorEventId, FabParams fab) {
259
+        layout.setFab(screenInstanceId, navigatorEventId, fab);
260
+    }
261
+
257 262
     public void toggleSideMenuVisible(boolean animated, Side side) {
258 263
         layout.toggleSideMenuVisible(animated, side);
259 264
     }

+ 14
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationCommandsHandler.java View File

@@ -7,6 +7,7 @@ import com.facebook.react.bridge.Callback;
7 7
 import com.reactnativenavigation.NavigationApplication;
8 8
 import com.reactnativenavigation.params.ActivityParams;
9 9
 import com.reactnativenavigation.params.ContextualMenuParams;
10
+import com.reactnativenavigation.params.FabParams;
10 11
 import com.reactnativenavigation.params.ScreenParams;
11 12
 import com.reactnativenavigation.params.SnackbarParams;
12 13
 import com.reactnativenavigation.params.TitleBarButtonParams;
@@ -210,6 +211,19 @@ public class NavigationCommandsHandler {
210 211
         });
211 212
     }
212 213
 
214
+    public static void setScreenFab(final String screenInstanceId, final String navigatorEventId, final FabParams fab) {
215
+        final NavigationActivity currentActivity = NavigationActivity.currentActivity;
216
+        if (currentActivity == null) {
217
+            return;
218
+        }
219
+        NavigationApplication.instance.runOnMainThread(new Runnable() {
220
+            @Override
221
+            public void run() {
222
+                currentActivity.setScreenFab(screenInstanceId, navigatorEventId, fab);
223
+            }
224
+        });
225
+    }
226
+
213 227
     public static void dismissTopModal() {
214 228
         final NavigationActivity currentActivity = NavigationActivity.currentActivity;
215 229
         if (currentActivity == null) {

+ 18
- 0
android/app/src/main/java/com/reactnativenavigation/events/FabSetEvent.java View File

@@ -0,0 +1,18 @@
1
+package com.reactnativenavigation.events;
2
+
3
+import com.reactnativenavigation.params.FabParams;
4
+
5
+public class FabSetEvent implements Event {
6
+    public static final String TYPE = "FabSetEvent";
7
+
8
+    public FabParams fabParams;
9
+
10
+    public FabSetEvent(FabParams fabParams) {
11
+        this.fabParams = fabParams;
12
+    }
13
+
14
+    @Override
15
+    public String getType() {
16
+        return TYPE;
17
+    }
18
+}

+ 17
- 0
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java View File

@@ -7,12 +7,15 @@ import android.view.View;
7 7
 import android.widget.RelativeLayout;
8 8
 
9 9
 import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
10
+import com.facebook.react.bridge.Arguments;
10 11
 import com.facebook.react.bridge.Callback;
12
+import com.facebook.react.bridge.WritableMap;
11 13
 import com.reactnativenavigation.NavigationApplication;
12 14
 import com.reactnativenavigation.events.EventBus;
13 15
 import com.reactnativenavigation.events.ScreenChangedEvent;
14 16
 import com.reactnativenavigation.params.ActivityParams;
15 17
 import com.reactnativenavigation.params.ContextualMenuParams;
18
+import com.reactnativenavigation.params.FabParams;
16 19
 import com.reactnativenavigation.params.ScreenParams;
17 20
 import com.reactnativenavigation.params.SideMenuParams;
18 21
 import com.reactnativenavigation.params.SnackbarParams;
@@ -178,6 +181,13 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
178 181
         }
179 182
     }
180 183
 
184
+    @Override
185
+    public void setFab(String screenInstanceId, String navigatorEventId, FabParams fabParams) {
186
+        for (int i = 0; i < bottomTabs.getItemsCount(); i++) {
187
+            screenStacks[i].setFab(screenInstanceId, navigatorEventId, fabParams);
188
+        }
189
+    }
190
+
181 191
     @Override
182 192
     public void toggleSideMenuVisible(boolean animated, Side side) {
183 193
         if (sideMenu != null) {
@@ -290,9 +300,16 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
290 300
         hideCurrentStack();
291 301
         showNewStack(position);
292 302
         EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
303
+        sendTabSelectedEventToJs();
293 304
         return true;
294 305
     }
295 306
 
307
+    private void sendTabSelectedEventToJs() {
308
+        WritableMap data = Arguments.createMap();
309
+        String navigatorEventId = getCurrentScreenStack().peek().getNavigatorEventId();
310
+        NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("bottomTabSelected", navigatorEventId, data);
311
+    }
312
+
296 313
     private void showNewStack(int position) {
297 314
         showStackAndUpdateStyle(screenStacks[position]);
298 315
         currentStackIndex = position;

+ 3
- 0
android/app/src/main/java/com/reactnativenavigation/layouts/Layout.java View File

@@ -4,6 +4,7 @@ import android.view.View;
4 4
 
5 5
 import com.facebook.react.bridge.Callback;
6 6
 import com.reactnativenavigation.params.ContextualMenuParams;
7
+import com.reactnativenavigation.params.FabParams;
7 8
 import com.reactnativenavigation.params.SnackbarParams;
8 9
 import com.reactnativenavigation.params.TitleBarButtonParams;
9 10
 import com.reactnativenavigation.params.TitleBarLeftButtonParams;
@@ -26,6 +27,8 @@ public interface Layout extends ScreenStackContainer {
26 27
 
27 28
     void setTitleBarLeftButton(String screenInstanceId, String navigatorEventId, TitleBarLeftButtonParams titleBarLeftButtonParams);
28 29
 
30
+    void setFab(String screenInstanceId, String navigatorEventId, FabParams fabParams);
31
+
29 32
     void toggleSideMenuVisible(boolean animated, Side side);
30 33
 
31 34
     void setSideMenuVisible(boolean animated, boolean visible, Side side);

+ 6
- 0
android/app/src/main/java/com/reactnativenavigation/layouts/SingleScreenLayout.java View File

@@ -10,6 +10,7 @@ import com.reactnativenavigation.NavigationApplication;
10 10
 import com.reactnativenavigation.events.EventBus;
11 11
 import com.reactnativenavigation.events.ScreenChangedEvent;
12 12
 import com.reactnativenavigation.params.ContextualMenuParams;
13
+import com.reactnativenavigation.params.FabParams;
13 14
 import com.reactnativenavigation.params.ScreenParams;
14 15
 import com.reactnativenavigation.params.SideMenuParams;
15 16
 import com.reactnativenavigation.params.SnackbarParams;
@@ -185,6 +186,11 @@ public class SingleScreenLayout extends RelativeLayout implements Layout {
185 186
         stack.setScreenTitleBarLeftButton(screenInstanceId, navigatorEventId, titleBarLeftButtonParams);
186 187
     }
187 188
 
189
+    @Override
190
+    public void setFab(String screenInstanceId, String navigatorEventId, FabParams fabParams) {
191
+        stack.setFab(screenInstanceId, navigatorEventId, fabParams);
192
+    }
193
+
188 194
     @Override
189 195
     public void toggleSideMenuVisible(boolean animated, Side side) {
190 196
         if (sideMenu != null) {

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/params/FabParams.java View File

@@ -16,4 +16,8 @@ public class FabParams {
16 16
     public boolean hasExpendedState() {
17 17
         return actions != null && actions.size() > 0;
18 18
     }
19
+
20
+    public boolean isValid() {
21
+        return collapsedId != null;
22
+    }
19 23
 }

+ 3
- 1
android/app/src/main/java/com/reactnativenavigation/params/parsers/ContextualMenuButtonParamsParser.java View File

@@ -20,7 +20,9 @@ public class ContextualMenuButtonParamsParser extends TitleBarButtonParamsParser
20 20
 
21 21
     private ContextualMenuButtonParams parseSingleContextualMenuButton(Bundle button) {
22 22
         ContextualMenuButtonParams result = new ContextualMenuButtonParams();
23
-        result.icon = ImageLoader.loadImage(button.getString("icon"));
23
+        if (button.get("icon") != null) {
24
+            result.icon = ImageLoader.loadImage(button.getString("icon"));
25
+        }
24 26
         result.showAsAction = parseShowAsAction(button.getString("showAsAction"));
25 27
         result.color = StyleParams.Color.parse(button, "color");
26 28
         result.label = button.getString("label");

+ 9
- 0
android/app/src/main/java/com/reactnativenavigation/screens/Screen.java View File

@@ -13,10 +13,12 @@ import com.reactnativenavigation.animation.VisibilityAnimator;
13 13
 import com.reactnativenavigation.events.ContextualMenuHiddenEvent;
14 14
 import com.reactnativenavigation.events.Event;
15 15
 import com.reactnativenavigation.events.EventBus;
16
+import com.reactnativenavigation.events.FabSetEvent;
16 17
 import com.reactnativenavigation.events.Subscriber;
17 18
 import com.reactnativenavigation.events.ViewPagerScreenChangedEvent;
18 19
 import com.reactnativenavigation.params.BaseScreenParams;
19 20
 import com.reactnativenavigation.params.ContextualMenuParams;
21
+import com.reactnativenavigation.params.FabParams;
20 22
 import com.reactnativenavigation.params.ScreenParams;
21 23
 import com.reactnativenavigation.params.StyleParams;
22 24
 import com.reactnativenavigation.params.TitleBarButtonParams;
@@ -192,6 +194,13 @@ public abstract class Screen extends RelativeLayout implements Subscriber {
192 194
                 screenParams.overrideBackPressInJs);
193 195
     }
194 196
 
197
+    public void setFab(FabParams fabParams) {
198
+        screenParams.fabParams = fabParams;
199
+        if (isShown()) {
200
+            EventBus.instance.post(new FabSetEvent(fabParams));
201
+        }
202
+    }
203
+
195 204
     public StyleParams getStyleParams() {
196 205
         return screenParams.styleParams;
197 206
     }

+ 10
- 0
android/app/src/main/java/com/reactnativenavigation/screens/ScreenStack.java View File

@@ -10,6 +10,7 @@ import android.widget.RelativeLayout.LayoutParams;
10 10
 import com.facebook.react.bridge.Callback;
11 11
 import com.reactnativenavigation.NavigationApplication;
12 12
 import com.reactnativenavigation.params.ContextualMenuParams;
13
+import com.reactnativenavigation.params.FabParams;
13 14
 import com.reactnativenavigation.params.ScreenParams;
14 15
 import com.reactnativenavigation.params.StyleParams;
15 16
 import com.reactnativenavigation.params.TitleBarButtonParams;
@@ -234,6 +235,15 @@ public class ScreenStack {
234 235
         });
235 236
     }
236 237
 
238
+    public void setFab(String screenInstanceId, final String navigatorEventId, final FabParams fabParams) {
239
+        performOnScreen(screenInstanceId, new Task<Screen>() {
240
+            @Override
241
+            public void run(Screen param) {
242
+                param.setFab(fabParams);
243
+            }
244
+        });
245
+    }
246
+
237 247
     public void showContextualMenu(String screenInstanceId, final ContextualMenuParams params, final Callback onButtonClicked) {
238 248
         performOnScreen(screenInstanceId, new Task<Screen>() {
239 249
             @Override

+ 3
- 0
android/app/src/main/java/com/reactnativenavigation/views/FloatingActionButtonCoordinator.java View File

@@ -44,6 +44,9 @@ public class FloatingActionButtonCoordinator {
44 44
 
45 45
     public void add(FabParams params) {
46 46
         this.params = params;
47
+        if (!params.isValid()) {
48
+            return;
49
+        }
47 50
         createCollapsedFab();
48 51
         createExpendedFab();
49 52
         setStyle();

+ 5
- 1
android/app/src/main/java/com/reactnativenavigation/views/SnackbarAndFabContainer.java View File

@@ -5,6 +5,7 @@ import android.support.design.widget.CoordinatorLayout;
5 5
 
6 6
 import com.reactnativenavigation.events.Event;
7 7
 import com.reactnativenavigation.events.EventBus;
8
+import com.reactnativenavigation.events.FabSetEvent;
8 9
 import com.reactnativenavigation.events.ScreenChangedEvent;
9 10
 import com.reactnativenavigation.events.Subscriber;
10 11
 import com.reactnativenavigation.params.FabParams;
@@ -38,9 +39,12 @@ public class SnackbarAndFabContainer extends CoordinatorLayout implements Snakba
38 39
 
39 40
     @Override
40 41
     public void onEvent(Event event) {
41
-        if (event.getType() == ScreenChangedEvent.TYPE) {
42
+        if (ScreenChangedEvent.TYPE.equals(event.getType())) {
42 43
             onScreenChange(((ScreenChangedEvent) event).fabParams);
43 44
         }
45
+        if (FabSetEvent.TYPE.equals(event.getType())) {
46
+            updateFab(((FabSetEvent) event).fabParams);
47
+        }
44 48
     }
45 49
 
46 50
     private void onScreenChange(FabParams fabParams) {

+ 20
- 0
ios/RCCTabBarController.m View File

@@ -2,9 +2,27 @@
2 2
 #import "RCCViewController.h"
3 3
 #import "RCTConvert.h"
4 4
 #import "RCCManager.h"
5
+#import "RCTUIManager.h"
6
+
7
+@interface RCTUIManager ()
8
+
9
+- (void)configureNextLayoutAnimation:(NSDictionary *)config
10
+                        withCallback:(RCTResponseSenderBlock)callback
11
+                       errorCallback:(__unused RCTResponseSenderBlock)errorCallback;
12
+
13
+@end
5 14
 
6 15
 @implementation RCCTabBarController
7 16
 
17
+- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
18
+  id queue = [[RCCManager sharedInstance].getBridge uiManager].methodQueue;
19
+  dispatch_async(queue, ^{
20
+    [[[RCCManager sharedInstance].getBridge uiManager] configureNextLayoutAnimation:nil withCallback:^(NSArray* arr){} errorCallback:^(NSArray* arr){}];
21
+  });
22
+  
23
+  return YES;
24
+}
25
+
8 26
 - (UIImage *)image:(UIImage*)image withColor:(UIColor *)color1
9 27
 {
10 28
   UIGraphicsBeginImageContextWithOptions(image.size, NO, image.scale);
@@ -26,6 +44,8 @@
26 44
   self = [super init];
27 45
   if (!self) return nil;
28 46
   
47
+  self.delegate = self;
48
+  
29 49
   self.tabBar.translucent = YES; // default
30 50
   
31 51
   UIColor *buttonColor = nil;

+ 2
- 2
src/Navigation.js View File

@@ -43,7 +43,7 @@ function _registerComponentNoRedux(screenID, generator) {
43 43
 
44 44
       render() {
45 45
         return (
46
-          <InternalComponent navigator={this.navigator} {...this.state.internalProps} />
46
+          <InternalComponent testID={screenID} navigator={this.navigator} {...this.state.internalProps} />
47 47
         );
48 48
       }
49 49
     };
@@ -75,7 +75,7 @@ function _registerComponentRedux(screenID, generator, store, Provider) {
75 75
       render() {
76 76
         return (
77 77
           <Provider store={store}>
78
-            <InternalComponent navigator={this.navigator} {...this.state.internalProps} />
78
+            <InternalComponent testID={screenID} navigator={this.navigator} {...this.state.internalProps} />
79 79
           </Provider>
80 80
         );
81 81
       }

+ 38
- 23
src/deprecated/platformSpecificDeprecated.android.js View File

@@ -278,7 +278,10 @@ function navigatorSetButtons(navigator, navigatorEventID, params) {
278 278
       }
279 279
     }
280 280
   }
281
-  newPlatformSpecific.setScreenTitleBarButtons(navigator.screenInstanceID, navigatorEventID, params.rightButtons, leftButton);
281
+  const fab = getFab(params);
282
+  console.log('params: ', JSON.stringify(params));
283
+  console.log('fab: ', JSON.stringify(fab));
284
+  newPlatformSpecific.setScreenButtons(navigator.screenInstanceID, navigatorEventID, params.rightButtons, leftButton, fab);
282 285
 }
283 286
 
284 287
 function navigatorSetTabBadge(navigator, params) {
@@ -411,32 +414,40 @@ function addNavigatorButtons(screen, sideMenuParams) {
411 414
 }
412 415
 
413 416
 function getFab(screen) {
417
+  let fab = screen.fab;
414 418
   if (screen.navigatorButtons && screen.navigatorButtons.fab) {
415
-    const fab = screen.navigatorButtons.fab;
416
-    const collapsedIconUri = resolveAssetSource(fab.collapsedIcon);
417
-    if (!collapsedIconUri) {
418
-      return;
419
-    }
420
-    fab.collapsedIcon = collapsedIconUri.uri;
421
-    if (fab.expendedIcon) {
422
-      const expendedIconUri = resolveAssetSource(fab.expendedIcon);
423
-      if (expendedIconUri) {
424
-        fab.expendedIcon = expendedIconUri.uri;
425
-      }
426
-    }
427
-    if (fab.backgroundColor) {
428
-      fab.backgroundColor = processColor(fab.backgroundColor);
429
-    }
419
+    fab = screen.navigatorButtons.fab;
420
+  }
421
+  if (fab === null || fab === undefined) {
422
+    return;
423
+  }
424
+  if (Object.keys(fab).length === 0 ) {
425
+    return {};
426
+  }
430 427
 
431
-    if (fab.actions) {
432
-      _.forEach(fab.actions, (action) => {
433
-        action.icon = resolveAssetSource(action.icon).uri;
434
-        return action;
435
-      });
428
+  const collapsedIconUri = resolveAssetSource(fab.collapsedIcon);
429
+  if (!collapsedIconUri) {
430
+    return;
431
+  }
432
+  fab.collapsedIcon = collapsedIconUri.uri;
433
+  if (fab.expendedIcon) {
434
+    const expendedIconUri = resolveAssetSource(fab.expendedIcon);
435
+    if (expendedIconUri) {
436
+      fab.expendedIcon = expendedIconUri.uri;
436 437
     }
438
+  }
439
+  if (fab.backgroundColor) {
440
+    fab.backgroundColor = processColor(fab.backgroundColor);
441
+  }
437 442
 
438
-    return fab;
443
+  if (fab.actions) {
444
+    _.forEach(fab.actions, (action) => {
445
+      action.icon = resolveAssetSource(action.icon).uri;
446
+      return action;
447
+    });
439 448
   }
449
+
450
+  return fab;
440 451
 }
441 452
 
442 453
 function createSideMenuButton() {
@@ -509,11 +520,15 @@ function showContextualMenu(navigator, params) {
509 520
 
510 521
   params.rightButtons.forEach((button, index) => {
511 522
     const btn = {
512
-      icon: resolveAssetSource(button.icon).uri,
523
+      icon: resolveAssetSource(button.icon),
524
+      showAsAction: button.showAsAction,
513 525
       color: processColor(button.color),
514 526
       label: button.title,
515 527
       index
516 528
     };
529
+    if (btn.icon) {
530
+      btn.icon = btn.icon.uri;
531
+    }
517 532
     contextualMenu.buttons.push(btn);
518 533
   });
519 534
 

+ 3
- 3
src/platformSpecific.android.js View File

@@ -44,8 +44,8 @@ function setScreenTitleBarSubtitle(screenInstanceID, subtitle) {
44 44
   NativeReactModule.setScreenTitleBarSubtitle(screenInstanceID, subtitle);
45 45
 }
46 46
 
47
-function setScreenTitleBarButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton) {
48
-  NativeReactModule.setScreenTitleBarButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton);
47
+function setScreenButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton, fab) {
48
+  NativeReactModule.setScreenButtons(screenInstanceID, navigatorEventID, rightButtons, leftButton, fab);
49 49
 }
50 50
 
51 51
 function showModal(screenParams) {
@@ -141,7 +141,7 @@ module.exports = {
141 141
   toggleBottomTabsVisible,
142 142
   setScreenTitleBarTitle,
143 143
   setScreenTitleBarSubtitle,
144
-  setScreenTitleBarButtons,
144
+  setScreenButtons,
145 145
   showModal,
146 146
   dismissTopModal,
147 147
   dismissAllModals,