Undo reaction with clicking minus (#3773)

* Undo reaction with clicking minus

* fix isMyNote
This commit is contained in:
MeiMei
2018-12-28 01:01:58 +09:00
committed by syuilo
parent 6c1893f869
commit 1029bff5ff
6 changed files with 26 additions and 4 deletions

View File

@ -142,6 +142,14 @@ export default (opts: Opts = {}) => ({
});
},
undoReact(note) {
const oldReaction = note.myReaction;
if (!oldReaction) return;
this.$root.api('notes/reactions/delete', {
noteId: note.id
});
},
favorite() {
this.$root.api('notes/favorites/create', {
noteId: this.appearNote.id