remove filter request button from linking device

we match the android way: when a request you can directly accept or
cancel the whole link process.
pull/860/head
Audric Ackermann 5 years ago
parent f91ce45c92
commit fc9fd5a514
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -117,12 +117,13 @@ export class DevicePairingDialog extends React.Component<Props, State> {
<div className="text-subtle">{secretWords}</div> <div className="text-subtle">{secretWords}</div>
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton <SessionButton
text={window.i18n('skip')} text={window.i18n('cancel')}
onClick={this.skipDevice} onClick={this.skipDevice}
/> />
<SessionButton <SessionButton
text={window.i18n('allowPairing')} text={window.i18n('allowPairing')}
onClick={this.allowDevice} onClick={this.allowDevice}
buttonColor={SessionButtonColor.Green}
/> />
</div> </div>
</div> </div>
@ -158,14 +159,7 @@ export class DevicePairingDialog extends React.Component<Props, State> {
text={window.i18n('cancel')} text={window.i18n('cancel')}
onClick={this.closeDialog} onClick={this.closeDialog}
/> />
) : ( ) : null}
<div className="session-modal__button-group">
<SessionButton
text={window.i18n('filterReceivedRequests')}
onClick={this.stopReceivingRequests}
/>
</div>
)}
</div> </div>
</div> </div>
</SessionModal> </SessionModal>
@ -270,6 +264,7 @@ export class DevicePairingDialog extends React.Component<Props, State> {
}); });
if (!this.state.currentPubKey) { if (!this.state.currentPubKey) {
this.nextPubKey(); this.nextPubKey();
this.stopReceivingRequests();
} }
} }
@ -307,14 +302,7 @@ export class DevicePairingDialog extends React.Component<Props, State> {
this.state.currentPubKey this.state.currentPubKey
); );
const hasNext = this.state.pubKeyRequests.length > 0; this.closeDialog();
this.nextPubKey();
if (!hasNext) {
this.startReceivingRequests();
}
this.setState({
currentView: hasNext ? 'filterRequestView' : 'qrcodeView',
});
} }
private nextPubKey() { private nextPubKey() {

Loading…
Cancel
Save