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 = (
- <>
-
- >
- );
- }
-
let dmActions;
if (staffCanSee) {
dmActions = (
@@ -353,7 +340,6 @@
{keyserverSelection}
{developerTools}
- {experimentalLogoutActions}
{dmActions}
@@ -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 = (
-
- Log out secondary device
-
-
- );
- }
-
let preferences;
if (staffCanSee) {
preferences = (
@@ -310,7 +300,6 @@
Log out
- {experimentalLogOutSection}
Friend List