Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3366320
D14036.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14036.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 10:50 AM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584320
Default Alt Text
D14036.diff (2 KB)
Attached To
Mode
D14036: [native][web] Show version unsupported modal when received use_new_flow on logout
Attached
Detach File
Event Timeline
Log In to Comment