mobile: cleanup

This commit is contained in:
Ammar Ahmed
2024-02-28 12:52:14 +05:00
committed by Abdullah Atta
parent cd62069b9b
commit f0ef9e072e

View File

@@ -51,15 +51,7 @@ const ColorItem = ({ item, note }: { item: Color; note: Note }) => {
}, [item, note.id]);
const toggleColor = async () => {
await db.relations
.to(
{
type: "note",
id: note.id
},
"color"
)
.unlink();
await db.relations.to(note, "color").unlink();
if (!isLinked) {
await db.relations.add(item, note);