prevent deleting mailbox when offline
This commit is contained in:
Vendored
+3
-2
@@ -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(
|
||||
|
||||
+5
-2
@@ -87,8 +87,11 @@ export const mailboxId = React.restoreState("mailbox-id", "");
|
||||
export const isMailboxActive = new React.State(false);
|
||||
|
||||
export const cannotDeleteMailbox = React.createProxyState(
|
||||
[mailboxId, isMailboxActive],
|
||||
() => mailboxId.value == "" || isMailboxActive.value == false
|
||||
[mailboxId, isMailboxActive, isConnected],
|
||||
() =>
|
||||
mailboxId.value == "" ||
|
||||
isMailboxActive.value == false ||
|
||||
isConnected.value == false
|
||||
);
|
||||
export const cannotRequestMailbox = React.createProxyState(
|
||||
[isConnected, isMailboxActive],
|
||||
|
||||
Reference in New Issue
Block a user