prevent deleting mailbox when offline

This commit is contained in:
marlon-erler
2024-07-09 22:05:08 +02:00
parent 07fe405c4a
commit ec9116e12c
2 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -673,8 +673,8 @@
var mailboxId = restoreState("mailbox-id", "");
var isMailboxActive = new State(false);
var cannotDeleteMailbox = createProxyState(
[mailboxId, isMailboxActive],
() => mailboxId.value == "" || isMailboxActive.value == false
[mailboxId, isMailboxActive, isConnected],
() => mailboxId.value == "" || isMailboxActive.value == false || isConnected.value == false
);
var cannotRequestMailbox = createProxyState(
[isConnected, isMailboxActive],
@@ -879,6 +879,7 @@
function deleteChat() {
chat.deleteSelf();
closeModal();
closeChatView();
}
const shouldShowKey = new State(false);
const inputType = createProxyState(