fix mailbox
This commit is contained in:
Vendored
+7
-2
@@ -641,11 +641,15 @@
|
|||||||
function resetAddressInput() {
|
function resetAddressInput() {
|
||||||
serverAddressInput.value = currentAddress.value;
|
serverAddressInput.value = currentAddress.value;
|
||||||
}
|
}
|
||||||
UDN.onconnect = () => {
|
function subscribeChannels() {
|
||||||
isConnected.value = true;
|
|
||||||
chats.value.forEach((chat) => {
|
chats.value.forEach((chat) => {
|
||||||
UDN.subscribe(chat.primaryChannel.value);
|
UDN.subscribe(chat.primaryChannel.value);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
UDN.onconnect = () => {
|
||||||
|
isConnected.value = true;
|
||||||
|
subscribeChannels();
|
||||||
|
if (mailboxId.value != "") UDN.connectMailbox(mailboxId.value);
|
||||||
};
|
};
|
||||||
UDN.onmessage = (data) => {
|
UDN.onmessage = (data) => {
|
||||||
chats.value.forEach((chat) => {
|
chats.value.forEach((chat) => {
|
||||||
@@ -683,6 +687,7 @@
|
|||||||
UDN.onmailboxdelete = () => {
|
UDN.onmailboxdelete = () => {
|
||||||
isMailboxActive.value = false;
|
isMailboxActive.value = false;
|
||||||
mailboxId.value = "";
|
mailboxId.value = "";
|
||||||
|
subscribeChannels();
|
||||||
};
|
};
|
||||||
var isEncryptionAvailable = window.crypto.subtle != void 0;
|
var isEncryptionAvailable = window.crypto.subtle != void 0;
|
||||||
var senderName = restoreState("sender-name", "");
|
var senderName = restoreState("sender-name", "");
|
||||||
|
|||||||
+9
-4
@@ -56,13 +56,17 @@ export function resetAddressInput(): void {
|
|||||||
serverAddressInput.value = currentAddress.value;
|
serverAddressInput.value = currentAddress.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// listeners
|
export function subscribeChannels() {
|
||||||
UDN.onconnect = () => {
|
|
||||||
isConnected.value = true;
|
|
||||||
|
|
||||||
chats.value.forEach((chat) => {
|
chats.value.forEach((chat) => {
|
||||||
UDN.subscribe(chat.primaryChannel.value);
|
UDN.subscribe(chat.primaryChannel.value);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// listeners
|
||||||
|
UDN.onconnect = () => {
|
||||||
|
isConnected.value = true;
|
||||||
|
subscribeChannels();
|
||||||
|
if (mailboxId.value != "") UDN.connectMailbox(mailboxId.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
UDN.onmessage = (data) => {
|
UDN.onmessage = (data) => {
|
||||||
@@ -115,6 +119,7 @@ UDN.onmailboxconnect = () => {
|
|||||||
UDN.onmailboxdelete = () => {
|
UDN.onmailboxdelete = () => {
|
||||||
isMailboxActive.value = false;
|
isMailboxActive.value = false;
|
||||||
mailboxId.value = "";
|
mailboxId.value = "";
|
||||||
|
subscribeChannels();
|
||||||
};
|
};
|
||||||
|
|
||||||
// MISC
|
// MISC
|
||||||
|
|||||||
Reference in New Issue
Block a user