update mailbox when chat channel changes

This commit is contained in:
marlon-erler
2024-07-09 20:20:25 +02:00
parent 41efa5cbf6
commit 036ade9db4
3 changed files with 12 additions and 3 deletions
+6
View File
@@ -473,6 +473,7 @@
if (this.cannotSetChannel.value == true) return;
this.primaryChannel.value = this.primaryChannelInput.value;
UDN.subscribe(this.primaryChannel.value);
updateMailbox();
};
undoChannelChange = () => {
this.primaryChannelInput.value = this.primaryChannel.value;
@@ -493,6 +494,7 @@
newChat.primaryChannelInput.value = name;
chatIds.add(newChat.id);
UDN.subscribe(name);
updateMailbox();
}
// node_modules/udn-frontend/index.ts
@@ -681,6 +683,10 @@
if (cannotDeleteMailbox.value == true) return;
UDN.deleteMailbox(mailboxId.value);
}
function updateMailbox() {
deleteMailbox();
setTimeout(() => requestMailbox(), 10);
}
UDN.onmailboxcreate = (id) => {
mailboxId.value = id;
UDN.connectMailbox(id);