fix bug registration done after link device cancelled

to reproduce before this fix:
- start link process of second device to first desktop device
- quit or refresh the second device window without updating any fields
- quit or refresh (a second time) the second device window without
updating any fields
- the second device window is now considered logged in (as a new device,
not linked with the first one)

This forces a full reset of the registration state when the registration
components are loaded, which are loaded only if the registration is not
done as required.
pull/1094/head
Audric Ackermann 5 years ago
parent cd143d8758
commit 4e1e7132d4
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -124,11 +124,12 @@ export class RegistrationTabs extends React.Component<{}, State> {
this.accountManager = window.getAccountManager(); this.accountManager = window.getAccountManager();
// Clean status in case the app closed unexpectedly // Clean status in case the app closed unexpectedly
window.textsecure.storage.remove('secondaryDeviceStatus');
} }
public componentDidMount() { public componentDidMount() {
this.generateMnemonicAndKeyPair().ignore(); this.generateMnemonicAndKeyPair().ignore();
window.textsecure.storage.remove('secondaryDeviceStatus');
this.resetRegistration().ignore();
} }
public render() { public render() {

Loading…
Cancel
Save