Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3520517
D14147.id46383.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D14147.id46383.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
@@ -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
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 12:39 AM (19 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2691898
Default Alt Text
D14147.id46383.diff (3 KB)
Attached To
Mode
D14147: [native][web] Merge logout buttons for old and new flows
Attached
Detach File
Event Timeline
Log In to Comment