update mailbox when setting channel
This commit is contained in:
@@ -145,6 +145,12 @@ export function deleteMailbox(): void {
|
|||||||
UDN.deleteMailbox(mailboxId.value);
|
UDN.deleteMailbox(mailboxId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updateMailbox(): void {
|
||||||
|
if (!isMailboxConnected) return;
|
||||||
|
deleteMailbox();
|
||||||
|
requestMailbox();
|
||||||
|
}
|
||||||
|
|
||||||
// messages
|
// messages
|
||||||
export async function sendMessage(): Promise<void> {
|
export async function sendMessage(): Promise<void> {
|
||||||
if (cannotSendMessage.value == true) return;
|
if (cannotSendMessage.value == true) return;
|
||||||
@@ -195,6 +201,8 @@ export function setChannel(): void {
|
|||||||
UDN.unsubscribe(currentPrimaryChannel.value);
|
UDN.unsubscribe(currentPrimaryChannel.value);
|
||||||
}
|
}
|
||||||
UDN.subscribe(primaryChannel.value);
|
UDN.subscribe(primaryChannel.value);
|
||||||
|
|
||||||
|
updateMailbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function leaveChannel(): void {
|
export function leaveChannel(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user