1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2025-02-23 14:40:49 +00:00

Merge pull request #5620 from shleeable/patch-15

Fix #5619 - Dupe method handleBookmark
This commit is contained in:
daniel 2025-02-03 03:14:05 -07:00 committed by GitHub
commit 088ea3204f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -846,32 +846,6 @@
})
},
handleBookmark(index) {
let p = this.feed[index];
if(p.reblog) {
p = p.reblog;
}
axios.post('/i/bookmark', {
item: p.id
})
.then(res => {
if(this.feed[index].reblog) {
this.feed[index].reblog.bookmarked = !p.bookmarked;
} else {
this.feed[index].bookmarked = !p.bookmarked;
}
})
.catch(err => {
this.$bvToast.toast('Cannot bookmark post at this time.', {
title: 'Bookmark Error',
variant: 'danger',
autoHideDelay: 5000
});
});
},
formatCount(val) {
return App.util.format.count(val);
},