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) {
const contact = this.getContactFor(decrMember.did);
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(
{
group: "modal",
@ -555,6 +556,7 @@ export default class MembersList extends Vue {
await this.addAsContact(decrMember);
// After adding as contact, proceed with admission
await this.toggleAdmission(decrMember);
this.startAutoRefresh();
},
onNo: async () => {
// 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,
onYes: async () => {
await this.toggleAdmission(decrMember);
this.startAutoRefresh();
},
onCancel: async () => {
// Do nothing, effectively canceling the operation
this.startAutoRefresh();
},
},
TIMEOUTS.MODAL,
);
},
onCancel: async () => {
this.startAutoRefresh();
},
},
TIMEOUTS.MODAL,
);

Loading…
Cancel
Save