Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: silence all notifications in focus mode

thecodrr32cad6601cb5
diff --git a/apps/web/src/utils/toast.js b/apps/web/src/utils/toast.js
index 2291e6c4e..d17d8daa9 100644
--- a/apps/web/src/utils/toast.js
+++ b/apps/web/src/utils/toast.js
@@ -4,12 +4,13 @@ import { Button, Flex, Text } from "rebass";
import ThemeProvider from "../components/theme-provider";
import * as Icon from "../components/icons";
import { toTitleCase } from "./string";
-
+import { store as appstore } from "../stores/app-store";
/**
*
* @returns {import("cogo-toast").CTReturn}
*/
function showToast(type, message, actions) {
+ if (appstore.get().isFocusMode) return null;
const IconComponent = Icon[toTitleCase(type)];
return CogoToast[type](