|
|
@ -5,6 +5,7 @@
|
|
|
|
textsecure,
|
|
|
|
textsecure,
|
|
|
|
ConversationController,
|
|
|
|
ConversationController,
|
|
|
|
$,
|
|
|
|
$,
|
|
|
|
|
|
|
|
QRCode,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
@ -21,6 +22,10 @@
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
this.render();
|
|
|
|
this.render();
|
|
|
|
this.showView();
|
|
|
|
this.showView();
|
|
|
|
|
|
|
|
this.qr = new QRCode(this.$('#qr')[0], {
|
|
|
|
|
|
|
|
correctLevel: QRCode.CorrectLevel.L,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.qr.makeCode(textsecure.storage.user.getNumber());
|
|
|
|
},
|
|
|
|
},
|
|
|
|
reset() {
|
|
|
|
reset() {
|
|
|
|
this.pubKey = null;
|
|
|
|
this.pubKey = null;
|
|
|
@ -194,6 +199,7 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
close() {
|
|
|
|
close() {
|
|
|
|
this.remove();
|
|
|
|
this.remove();
|
|
|
|
|
|
|
|
this.qr.clear();
|
|
|
|
if (this.pubKey && !this.accepted) {
|
|
|
|
if (this.pubKey && !this.accepted) {
|
|
|
|
this.trigger('devicePairingRequestRejected', this.pubKey);
|
|
|
|
this.trigger('devicePairingRequestRejected', this.pubKey);
|
|
|
|
}
|
|
|
|
}
|
|
|
|