mirror of
https://github.com/vector-im/element-web.git
synced 2026-01-16 22:11:17 +01:00
Iterate
This commit is contained in:
parent
c4e7cbe285
commit
1655bea6f0
@ -152,16 +152,11 @@ const SessionManagerTab: React.FC<{
|
||||
* delegated auth provider.
|
||||
* See https://github.com/matrix-org/matrix-spec-proposals/pull/3824
|
||||
*/
|
||||
const accountManagementEndpoint = useAsyncMemo(async () => {
|
||||
const accountManagement = useAsyncMemo(async () => {
|
||||
await sdkContext.oidcClientStore.readyPromise; // wait for the store to be ready
|
||||
return sdkContext.oidcClientStore.accountManagementEndpoint;
|
||||
return { endpoint:sdkContext.oidcClientStore.accountManagementEndpoint, actionsSupported: sdkContext.oidcClientStore.accountManagementActionsSupported };
|
||||
}, [sdkContext.oidcClientStore]);
|
||||
const accountManagementActionsSupported = useAsyncMemo(async () => {
|
||||
await sdkContext.oidcClientStore.readyPromise; // wait for the store to be ready
|
||||
return sdkContext.oidcClientStore.accountManagementActionsSupported;
|
||||
}, [sdkContext.oidcClientStore]);
|
||||
const disableMultipleSignout = !!accountManagementEndpoint;
|
||||
|
||||
const disableMultipleSignout = !!accountManagement?.endpoint;
|
||||
const userId = matrixClient?.getUserId();
|
||||
const currentUserMember = (userId && matrixClient?.getUser(userId)) || undefined;
|
||||
const clientVersions = useAsyncMemo(() => matrixClient.getVersions(), [matrixClient]);
|
||||
@ -237,8 +232,8 @@ const SessionManagerTab: React.FC<{
|
||||
const { onSignOutCurrentDevice, onSignOutOtherDevices, signingOutDeviceIds } = useSignOut(
|
||||
matrixClient,
|
||||
onSignoutResolvedCallback,
|
||||
accountManagementEndpoint,
|
||||
accountManagementActionsSupported,
|
||||
accountManagement?.endpoint,
|
||||
accountManagement?.actionsSupported,
|
||||
);
|
||||
|
||||
useEffect(
|
||||
@ -303,8 +298,8 @@ const SessionManagerTab: React.FC<{
|
||||
onSignOutCurrentDevice={onSignOutCurrentDevice}
|
||||
signOutAllOtherSessions={signOutAllOtherSessions}
|
||||
otherSessionsCount={otherSessionsCount}
|
||||
accountManagementEndpoint={accountManagementEndpoint}
|
||||
accountManagementActionsSupported={accountManagementActionsSupported}
|
||||
accountManagementEndpoint={accountManagement?.endpoint}
|
||||
accountManagementActionsSupported={accountManagement?.actionsSupported}
|
||||
/>
|
||||
{shouldShowOtherSessions && (
|
||||
<SettingsSubsection
|
||||
@ -338,7 +333,8 @@ const SessionManagerTab: React.FC<{
|
||||
setPushNotifications={setPushNotifications}
|
||||
ref={filteredDeviceListRef}
|
||||
supportsMSC3881={supportsMSC3881}
|
||||
accountManagementEndpoint={accountManagementEndpoint}
|
||||
accountManagementEndpoint={accountManagement?.endpoint}
|
||||
accountManagementActionsSupported={accountManagement?.actionsSupported}
|
||||
/>
|
||||
</SettingsSubsection>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user