mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
#4790 User experience: add a post to a collection just right after deleting it from there
This commit is contained in:
parent
a7320535e9
commit
7cb075dbf9
1 changed files with 4 additions and 0 deletions
|
@ -619,6 +619,9 @@ export default {
|
|||
this.posts = this.posts.filter(post => {
|
||||
return post.id != id;
|
||||
});
|
||||
this.ids = this.ids.filter(post_id => {
|
||||
return post_id != id;
|
||||
});
|
||||
},
|
||||
|
||||
addRecentId(post) {
|
||||
|
@ -630,6 +633,7 @@ export default {
|
|||
// window.location.reload();
|
||||
this.closeModals();
|
||||
this.posts.push(res.data);
|
||||
this.ids.push(post.id);
|
||||
this.collection.post_count++;
|
||||
}).catch(err => {
|
||||
swal('Oops!', 'An error occured, please try selecting another post.', 'error');
|
||||
|
|
Loading…
Reference in a new issue