Page MenuHomePhabricator

D14147.diff
No OneTemporary

D14147.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
@@ -274,19 +274,6 @@
);
}
- let experimentalLogoutActions;
- if (__DEV__) {
- experimentalLogoutActions = (
- <>
- <ProfileRow
- danger
- content="Log out (new flow)"
- onPress={this.onPressNewLogout}
- />
- </>
- );
- }
-
let dmActions;
if (staffCanSee) {
dmActions = (
@@ -353,7 +340,6 @@
{keyserverSelection}
<ProfileRow content="Build info" onPress={this.onPressBuildInfo} />
{developerTools}
- {experimentalLogoutActions}
{dmActions}
</View>
<View style={this.props.styles.unpaddedSection}>
@@ -372,6 +358,11 @@
if (this.loggedOutOrLoggingOut) {
return;
}
+ if (usingRestoreFlow) {
+ this.onPressNewLogout();
+ return;
+ }
+
if (!this.props.isAccountWithPassword) {
Alert.alert(
'Log out',
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
@@ -25,8 +25,8 @@
createOlmSessionsWithOwnDevices,
getContentSigningKey,
} from 'lib/utils/crypto-utils.js';
-import { isDev } from 'lib/utils/dev-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
+import { usingRestoreFlow } from 'lib/utils/services-utils.js';
import css from './account-settings.css';
import AppearanceChangeModal from './appearance-change-modal.react.js';
@@ -54,18 +54,20 @@
const sendSecondaryDeviceLogoutRequest = useSecondaryDeviceLogOut();
const dispatchActionPromise = useDispatchActionPromise();
- const logOutUser = React.useCallback(
- () => dispatchActionPromise(logOutActionTypes, sendLogoutRequest()),
- [dispatchActionPromise, sendLogoutRequest],
- );
- const logOutSecondaryDevice = React.useCallback(
- () =>
- dispatchActionPromise(
+ const logOutUser = React.useCallback(() => {
+ if (usingRestoreFlow) {
+ return dispatchActionPromise(
logOutActionTypes,
sendSecondaryDeviceLogoutRequest(),
- ),
- [dispatchActionPromise, sendSecondaryDeviceLogoutRequest],
- );
+ );
+ }
+ return dispatchActionPromise(logOutActionTypes, sendLogoutRequest());
+ }, [
+ dispatchActionPromise,
+ sendLogoutRequest,
+ sendSecondaryDeviceLogoutRequest,
+ ]);
+
const identityContext = React.useContext(IdentityClientContext);
const userID = useSelector(state => state.currentUserInfo?.id);
@@ -170,18 +172,6 @@
return null;
}
- let experimentalLogOutSection;
- if (isDev) {
- experimentalLogOutSection = (
- <li>
- <span>Log out secondary device</span>
- <Button variant="text" onClick={logOutSecondaryDevice}>
- <p className={css.buttonText}>Log out</p>
- </Button>
- </li>
- );
- }
-
let preferences;
if (staffCanSee) {
preferences = (
@@ -310,7 +300,6 @@
<p className={css.buttonText}>Log out</p>
</Button>
</li>
- {experimentalLogOutSection}
<li>
<span>Friend List</span>
<Button variant="text" onClick={openFriendList}>

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 4:28 PM (15 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2691898
Default Alt Text
D14147.diff (3 KB)

Event Timeline