1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Implement hard deletion and rename soft delete to hide

This commit is contained in:
Toby Zerner
2015-02-12 14:35:24 +10:30
parent c33697654a
commit 36787bcf45
18 changed files with 90 additions and 50 deletions

View File

@@ -168,6 +168,12 @@ export default Ember.ArrayProxy.extend(Ember.Evented, {
this.get('content').pushObject(this.makeItem(index, index, post));
},
removePost: function(post) {
this.get('ids').removeObject(post.get('id'));
var content = this.get('content');
content.removeObject(content.findBy('content', post));
},
makeItem: function(indexStart, indexEnd, post) {
var item = Ember.Object.create({
indexStart: indexStart,