Minor cleanups to initialiseDehydration (#29261)

* dehydration: fix documentation

* initialiseDehydration: improve name

... to make it clearer that it does nothing if dehydration is disabled

* initialiseDehydration: remove dependency on MatrixClientPeg

We're trying to move away from relying on `MatrixClientPeg` everywhere, and
this is a particularly easy win.
This commit is contained in:
Richard van der Hoff
2025-02-14 10:59:02 +00:00
committed by GitHub
parent c47ce59478
commit 09db599fe0
4 changed files with 12 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ import Spinner from "../../../../components/views/elements/Spinner";
import InteractiveAuthDialog from "../../../../components/views/dialogs/InteractiveAuthDialog";
import { type IValidationResult } from "../../../../components/views/elements/Validation";
import PassphraseConfirmField from "../../../../components/views/auth/PassphraseConfirmField";
import { initialiseDehydration } from "../../../../utils/device/dehydration";
import { initialiseDehydrationIfEnabled } from "../../../../utils/device/dehydration";
// I made a mistake while converting this and it has to be fixed!
enum Phase {
@@ -273,7 +273,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
setupNewKeyBackup: !backupInfo,
});
}
await initialiseDehydration({ createNewKey: true });
await initialiseDehydrationIfEnabled(cli, { createNewKey: true });
this.setState({
phase: Phase.Stored,