Browse Source

feat: improve auto-refresh handling during member admission dialogs

- Add stopAutoRefresh() calls before showing confirmation dialogs
- Add startAutoRefresh() calls after dialog interactions complete
- Ensure auto-refresh resumes properly in all dialog callback paths
- Fix missing onCancel handler for contact confirmation dialog

This prevents auto-refresh from interfering with user interactions
during member admission workflows while ensuring it resumes afterward.
pull/210/head
Jose Olarte III 7 days ago
parent
commit
27e38f583b
  1. 9
      src/components/MembersList.vue

9
src/components/MembersList.vue

@ -542,7 +542,8 @@ export default class MembersList extends Vue {
checkWhetherContactBeforeAdmitting(decrMember: DecryptedMember) { checkWhetherContactBeforeAdmitting(decrMember: DecryptedMember) {
const contact = this.getContactFor(decrMember.did); const contact = this.getContactFor(decrMember.did);
if (!decrMember.member.admitted && !contact) { if (!decrMember.member.admitted && !contact) {
// If not a contact, show confirmation dialog // If not a contact, stop auto-refresh and show confirmation dialog
this.stopAutoRefresh();
this.$notify( this.$notify(
{ {
group: "modal", group: "modal",
@ -555,6 +556,7 @@ export default class MembersList extends Vue {
await this.addAsContact(decrMember); await this.addAsContact(decrMember);
// After adding as contact, proceed with admission // After adding as contact, proceed with admission
await this.toggleAdmission(decrMember); await this.toggleAdmission(decrMember);
this.startAutoRefresh();
}, },
onNo: async () => { onNo: async () => {
// If they choose not to add as contact, show second confirmation // If they choose not to add as contact, show second confirmation
@ -567,14 +569,19 @@ export default class MembersList extends Vue {
yesText: NOTIFY_CONTINUE_WITHOUT_ADDING.yesText, yesText: NOTIFY_CONTINUE_WITHOUT_ADDING.yesText,
onYes: async () => { onYes: async () => {
await this.toggleAdmission(decrMember); await this.toggleAdmission(decrMember);
this.startAutoRefresh();
}, },
onCancel: async () => { onCancel: async () => {
// Do nothing, effectively canceling the operation // Do nothing, effectively canceling the operation
this.startAutoRefresh();
}, },
}, },
TIMEOUTS.MODAL, TIMEOUTS.MODAL,
); );
}, },
onCancel: async () => {
this.startAutoRefresh();
},
}, },
TIMEOUTS.MODAL, TIMEOUTS.MODAL,
); );

Loading…
Cancel
Save