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]);
|
}, [item, note.id]);
|
||||||
|
|
||||||
const toggleColor = async () => {
|
const toggleColor = async () => {
|
||||||
await db.relations
|
await db.relations.to(note, "color").unlink();
|
||||||
.to(
|
|
||||||
{
|
|
||||||
type: "note",
|
|
||||||
id: note.id
|
|
||||||
},
|
|
||||||
"color"
|
|
||||||
)
|
|
||||||
.unlink();
|
|
||||||
|
|
||||||
if (!isLinked) {
|
if (!isLinked) {
|
||||||
await db.relations.add(item, note);
|
await db.relations.add(item, note);
|
||||||
|
|||||||
Reference in New Issue
Block a user