mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
mobile: cleanup
This commit is contained in:
committed by
Abdullah Atta
parent
cd62069b9b
commit
f0ef9e072e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user