Page MenuHomePhabricator

D13920.id45777.diff
No OneTemporary

D13920.id45777.diff

diff --git a/native/components/nux-tips-context.react.js b/native/components/nux-tips-context.react.js
--- a/native/components/nux-tips-context.react.js
+++ b/native/components/nux-tips-context.react.js
@@ -5,7 +5,6 @@
import { values } from 'lib/utils/objects.js';
-import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
import type { NUXTipRouteNames } from '../navigation/route-names.js';
import {
CommunityDrawerTipRouteName,
@@ -26,9 +25,6 @@
type NUXTipParams = {
+tooltipLocation: 'below' | 'above' | 'absolute',
+routeName: NUXTipRouteNames,
- +exitingCallback?: <Route: NUXTipRouteNames>(
- navigation: AppNavigationProp<Route>,
- ) => void,
};
const firstNUXTipKey = nuxTip.INTRO;
@@ -49,7 +45,6 @@
[nuxTip.MUTED]: {
routeName: MutedTabTipRouteName,
tooltipLocation: 'below',
- exitingCallback: navigation => navigation.goBack(),
},
};
diff --git a/native/tooltip/nux-tips-overlay.react.js b/native/tooltip/nux-tips-overlay.react.js
--- a/native/tooltip/nux-tips-overlay.react.js
+++ b/native/tooltip/nux-tips-overlay.react.js
@@ -426,15 +426,11 @@
const onPressOk = React.useCallback(() => {
const { orderedTips, orderedTipsIndex } = route.params;
- const { exitingCallback } = tipParams;
goBackOnce();
- if (exitingCallback) {
- exitingCallback?.(navigation);
- }
-
const nextOrderedTipsIndex = orderedTipsIndex + 1;
if (nextOrderedTipsIndex >= orderedTips.length) {
+ navigation.goBack();
return;
}
@@ -448,7 +444,7 @@
orderedTipsIndex: nextOrderedTipsIndex,
},
});
- }, [goBackOnce, navigation, route.params, tipParams]);
+ }, [goBackOnce, navigation, route.params]);
const button = React.useMemo(
() =>

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 4:37 PM (13 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2537576
Default Alt Text
D13920.id45777.diff (1 KB)

Event Timeline