Page MenuHomePhabricator

D14036.id45997.diff
No OneTemporary

D14036.id45997.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,19 @@
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 showVersionUnsupportedModal = React.useCallback(() => {
+ pushModal(<VersionUnsupportedModal />);
+ }, [pushModal]);
+ const sendLogoutRequest = useLogOut({
+ handleUseNewFlowResponse: showVersionUnsupportedModal,
+ });
+
const sendSecondaryDeviceLogoutRequest = useSecondaryDeviceLogOut();
const dispatchActionPromise = useDispatchActionPromise();
const logOutUser = React.useCallback(
@@ -70,7 +78,6 @@
})();
}, []);
- const { pushModal, popModal } = useModalContext();
const showPasswordChangeModal = React.useCallback(
() => pushModal(<PasswordChangeModal />),
[pushModal],

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 12:35 PM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584320
Default Alt Text
D14036.id45997.diff (2 KB)

Event Timeline