Page MenuHomePhabricator

D14036.diff
No OneTemporary

D14036.diff

diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -59,6 +59,7 @@
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import Alert from '../utils/alert.js';
+import { useShowVersionUnsupportedAlert } from '../utils/hooks.js';
import { useStaffCanSee } from '../utils/staff-utils.js';
type ProfileRowProps = {
@@ -564,7 +565,6 @@
useSelector(logOutLoadingStatusSelector) === 'loading';
const colors = useColors();
const styles = useStyles(unboundStyles);
- const callLogOut = useLogOut();
const callPrimaryDeviceLogOut = usePrimaryDeviceLogOut();
const callSecondaryDeviceLogOut = useSecondaryDeviceLogOut();
const dispatchActionPromise = useDispatchActionPromise();
@@ -575,6 +575,11 @@
);
const currentUserID = useCurrentUserFID();
+ const showVersionUnsupportedAlert = useShowVersionUnsupportedAlert(false);
+ const callLogOut = useLogOut({
+ handleUseNewFlowResponse: showVersionUnsupportedAlert,
+ });
+
const userID = useSelector(
state => state.currentUserInfo && state.currentUserInfo.id,
);
diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js
--- a/web/settings/account-settings.react.js
+++ b/web/settings/account-settings.react.js
@@ -39,11 +39,21 @@
import TunnelbrokerTestScreen from './tunnelbroker-test.react.js';
import EditUserAvatar from '../avatars/edit-user-avatar.react.js';
import Button from '../components/button.react.js';
+import VersionUnsupportedModal from '../modals/version-unsupported-modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStaffCanSee } from '../utils/staff-utils.js';
function AccountSettings(): React.Node {
- const sendLogoutRequest = useLogOut();
+ const { pushModal, popModal } = useModalContext();
+
+ const logOutOptions = React.useMemo(() => {
+ const showVersionUnsupportedModal = () => {
+ pushModal(<VersionUnsupportedModal />);
+ };
+ return { handleUseNewFlowResponse: showVersionUnsupportedModal };
+ }, [pushModal]);
+ const sendLogoutRequest = useLogOut(logOutOptions);
+
const sendSecondaryDeviceLogoutRequest = useSecondaryDeviceLogOut();
const dispatchActionPromise = useDispatchActionPromise();
const logOutUser = React.useCallback(
@@ -70,7 +80,6 @@
})();
}, []);
- const { pushModal, popModal } = useModalContext();
const showPasswordChangeModal = React.useCallback(
() => pushModal(<PasswordChangeModal />),
[pushModal],

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 5:07 PM (4 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2707650
Default Alt Text
D14036.diff (2 KB)

Event Timeline