fix ReportMenu (#1397)

This commit is contained in:
GRL78 2021-09-01 10:11:12 +02:00 committed by GitHub
parent d7b552a513
commit 19baf7f582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 19 deletions

View file

@ -1,11 +1,12 @@
import { derived } from "svelte/store";
import { menuInputFocusStore } from "./MenuStore";
import { chatInputFocusStore } from "./ChatStore";
import { showReportScreenStore, userReportEmpty } from "./ShowReportScreenStore";
//derived from the focus on Menu, ConsoleGlobal, Chat and ...
export const enableUserInputsStore = derived(
[menuInputFocusStore, chatInputFocusStore],
([$menuInputFocusStore, $chatInputFocusStore]) => {
return !$menuInputFocusStore && !$chatInputFocusStore;
[menuInputFocusStore, chatInputFocusStore, showReportScreenStore],
([$menuInputFocusStore, $chatInputFocusStore, $showReportScreenStore]) => {
return !$menuInputFocusStore && !$chatInputFocusStore && !($showReportScreenStore !== userReportEmpty);
}
);