mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-21 19:36:22 +03:00
fix: update text after save in note edit
This commit is contained in:
parent
cdbf75a332
commit
cbc1e65fa1
1 changed files with 5 additions and 5 deletions
|
@ -97,15 +97,15 @@ function NotePage() {
|
||||||
text={edit ? locals.Save : locals.Edit}
|
text={edit ? locals.Save : locals.Edit}
|
||||||
icon={edit ? ArchiveBoxArrowDownIcon : PencilIcon}
|
icon={edit ? ArchiveBoxArrowDownIcon : PencilIcon}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (settings.CollabEdit === true) {
|
|
||||||
textUpdate(notes[params.id].text);
|
|
||||||
nameUpdate(notes[params.id].name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (edit) {
|
if (edit) {
|
||||||
notes[params.id].name = name;
|
notes[params.id].name = name;
|
||||||
notes[params.id].text = text;
|
notes[params.id].text = text;
|
||||||
localStorage.setObj("Notes", notes);
|
localStorage.setObj("Notes", notes);
|
||||||
|
} else {
|
||||||
|
if (settings.CollabEdit === true) {
|
||||||
|
textUpdate(notes[params.id].text);
|
||||||
|
nameUpdate(notes[params.id].name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setEdit(!edit);
|
setEdit(!edit);
|
||||||
|
|
Loading…
Add table
Reference in a new issue