|
@ -828,19 +828,16 @@ export default class ContactsView extends Vue { |
|
|
* Handle registration prompt for new contacts |
|
|
* Handle registration prompt for new contacts |
|
|
*/ |
|
|
*/ |
|
|
private async handleRegistrationPrompt(newContact: Contact): Promise<void> { |
|
|
private async handleRegistrationPrompt(newContact: Contact): Promise<void> { |
|
|
console.log("[ContactsView] handleRegistrationPrompt", this.isRegistered, this.hideRegisterPromptOnNewContact, newContact.registered); |
|
|
|
|
|
if ( |
|
|
if ( |
|
|
this.isRegistered === false || // the current Identity is not registered OR |
|
|
this.isRegistered === false || // the current Identity is not registered OR |
|
|
this.hideRegisterPromptOnNewContact === true || // the user has hidden the registrationprompt OR |
|
|
this.hideRegisterPromptOnNewContact === true || // the user has hidden the registrationprompt OR |
|
|
newContact.registered === true // the new contact is already registered |
|
|
newContact.registered === true // the new contact is already registered |
|
|
) { |
|
|
) { |
|
|
// if any of the above are true, we do not want to show the registration prompt |
|
|
// if any of the above are true, we do not want to show the registration prompt |
|
|
console.log("[ContactsView] handleRegistrationPrompt we do not want to show the registration prompt"); |
|
|
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
console.log("[ContactsView] handleRegistrationPrompt setTimeout"); |
|
|
|
|
|
this.$notify( |
|
|
this.$notify( |
|
|
{ |
|
|
{ |
|
|
group: "modal", |
|
|
group: "modal", |
|
@ -848,22 +845,18 @@ export default class ContactsView extends Vue { |
|
|
title: "Register", |
|
|
title: "Register", |
|
|
text: "Do you want to register them?", |
|
|
text: "Do you want to register them?", |
|
|
onCancel: async (stopAsking?: boolean) => { |
|
|
onCancel: async (stopAsking?: boolean) => { |
|
|
console.log("[ContactsView] handleRegistrationPrompt onCancel", stopAsking); |
|
|
|
|
|
await this.handleRegistrationPromptResponse(stopAsking); |
|
|
await this.handleRegistrationPromptResponse(stopAsking); |
|
|
}, |
|
|
}, |
|
|
onNo: async (stopAsking?: boolean) => { |
|
|
onNo: async (stopAsking?: boolean) => { |
|
|
console.log("[ContactsView] handleRegistrationPrompt onNo", stopAsking); |
|
|
|
|
|
await this.handleRegistrationPromptResponse(stopAsking); |
|
|
await this.handleRegistrationPromptResponse(stopAsking); |
|
|
}, |
|
|
}, |
|
|
onYes: async () => { |
|
|
onYes: async () => { |
|
|
console.log("[ContactsView] handleRegistrationPrompt onYes"); |
|
|
|
|
|
await this.register(newContact); |
|
|
await this.register(newContact); |
|
|
}, |
|
|
}, |
|
|
promptToStopAsking: true, |
|
|
promptToStopAsking: true, |
|
|
}, |
|
|
}, |
|
|
-1, |
|
|
-1, |
|
|
); |
|
|
); |
|
|
console.log("[ContactsView] handleRegistrationPrompt setTimeout done"); |
|
|
|
|
|
}, 1000); |
|
|
}, 1000); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1254,17 +1247,14 @@ export default class ContactsView extends Vue { |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
public handleQRCodeClick() { |
|
|
public handleQRCodeClick() { |
|
|
console.log("[ContactsView] handleQRCodeClick method called"); |
|
|
|
|
|
this.$logAndConsole( |
|
|
this.$logAndConsole( |
|
|
"[ContactsView] handleQRCodeClick method called", |
|
|
"[ContactsView] handleQRCodeClick method called", |
|
|
false, |
|
|
false, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
if (Capacitor.isNativePlatform()) { |
|
|
if (Capacitor.isNativePlatform()) { |
|
|
console.log("[ContactsView] Navigating to contact-qr-scan-full"); |
|
|
|
|
|
this.$router.push({ name: "contact-qr-scan-full" }); |
|
|
this.$router.push({ name: "contact-qr-scan-full" }); |
|
|
} else { |
|
|
} else { |
|
|
console.log("[ContactsView] Navigating to contact-qr"); |
|
|
|
|
|
this.$router.push({ name: "contact-qr" }); |
|
|
this.$router.push({ name: "contact-qr" }); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|