Skip to content

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

mobile: fix toast context in color picker

Ammar Ahmed1ddd7b1e6e8a
diff --git a/apps/mobile/app/components/dialogs/color-picker/index.tsx b/apps/mobile/app/components/dialogs/color-picker/index.tsx
index 31efcc53c..debc850d7 100644
--- a/apps/mobile/app/components/dialogs/color-picker/index.tsx
+++ b/apps/mobile/app/components/dialogs/color-picker/index.tsx
@@ -167,14 +167,16 @@ const ColorPicker = ({
);
if (!title.current)
return ToastManager.error(
- new Error(strings.allFieldsRequired())
+ new Error(strings.allFieldsRequired()),
+ "color-picker"
);
const exists = await db.colors.all.find((v) =>
v.and([v(`colorCode`, "==", selectedColor)])
);
if (exists)
return ToastManager.error(
- new Error(strings.colorExists(selectedColor))
+ new Error(strings.colorExists(selectedColor)),
+ "color-picker"
);
const id = await db.colors.add({
title: title.current,