diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue index ddc3c140..c5175d84 100644 --- a/src/views/ContactQRScanShowView.vue +++ b/src/views/ContactQRScanShowView.vue @@ -748,24 +748,17 @@ export default class ContactQRScanShow extends Vue { !contact.registered ) { setTimeout(() => { - this.notify.confirm( - "Do you want to register them?", + this.$notify( { + group: "modal", + type: "confirm", + title: "Register", + text: "Do you want to register them?", onCancel: async (stopAsking?: boolean) => { - if (stopAsking) { - await this.$updateSettings({ - hideRegisterPromptOnNewContact: stopAsking, - }); - this.hideRegisterPromptOnNewContact = stopAsking; - } + await this.handleRegistrationPromptResponse(stopAsking); }, onNo: async (stopAsking?: boolean) => { - if (stopAsking) { - await this.$updateSettings({ - hideRegisterPromptOnNewContact: stopAsking, - }); - this.hideRegisterPromptOnNewContact = stopAsking; - } + await this.handleRegistrationPromptResponse(stopAsking); }, onYes: async () => { await this.register(contact); @@ -895,6 +888,17 @@ export default class ContactQRScanShow extends Vue { videoElement.style.transform = shouldMirror ? "scaleX(-1)" : "none"; } } + + private async handleRegistrationPromptResponse( + stopAsking?: boolean, + ): Promise { + if (stopAsking) { + await this.$saveSettings({ + hideRegisterPromptOnNewContact: stopAsking, + }); + this.hideRegisterPromptOnNewContact = stopAsking; + } + } }