1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 18:21:33 +02:00

Fix deleting posts causing subsequent posts to display incorrectly

This commit is contained in:
Toby Zerner
2015-06-24 11:46:43 +09:30
parent cbb7e91eb4
commit 748abd9b0b

View File

@@ -160,9 +160,11 @@ class PostStream extends mixin(Component, evented) {
this.posts.map((post, i) => {
var content;
var attributes = {};
attributes['data-index'] = attributes.key = this.visibleStart + i;
attributes['data-index'] = this.visibleStart + i;
if (post) {
attributes.key = 'post'+post.id();
var PostComponent = app.postComponentRegistry[post.contentType()];
content = PostComponent ? PostComponent.component({post}) : '';
attributes.config = fadeIn;
@@ -178,6 +180,8 @@ class PostStream extends mixin(Component, evented) {
}
lastTime = post.time();
} else {
attributes.key = this.visibleStart + i;
content = PostLoading.component();
}