mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Fill update note response with real new tags to update sidebar menu
This commit is contained in:
@@ -203,9 +203,6 @@ class NoteController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// Purge orphan tags.
|
||||
$this->tagmapper->dropOld();
|
||||
|
||||
// Set new info on Note
|
||||
$note->setTitle($title);
|
||||
$note->setContent($content);
|
||||
@@ -217,6 +214,9 @@ class NoteController extends Controller {
|
||||
// Update note.
|
||||
$newnote = $this->notemapper->update($note);
|
||||
|
||||
// Fill new tags
|
||||
$newnote->setTags($this->tagmapper->getTagsForNote($this->userId, $newnote->getId()));
|
||||
|
||||
// Remove old color if necessary
|
||||
if (($oldcolorid !== $hcolor->getId()) &&
|
||||
(!$this->notemapper->colorIdCount($oldcolorid))) {
|
||||
@@ -224,6 +224,9 @@ class NoteController extends Controller {
|
||||
$this->colormapper->delete($oldcolor);
|
||||
}
|
||||
|
||||
// Purge orphan tags.
|
||||
$this->tagmapper->dropOld();
|
||||
|
||||
return new DataResponse($newnote);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user