FIX: If last post was deleted the gap was not displayed

This commit is contained in:
Robin Ward 2016-02-09 15:53:34 -05:00
parent 2998fe1ee5
commit 9ec44f755c
3 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,7 @@ export default MountWidget.extend({
return this.getProperties('posts',
'canCreatePost',
'multiSelect',
'gaps',
'selectedQuery',
'selectedPostsCount',
'searchService');

View File

@ -280,6 +280,7 @@ export default RestModel.extend({
if (idx !== -1) {
stream.pushObjects(gap);
return this.appendMore().then(() => {
delete this.get('gaps.after')[postId];
this.get('stream').enumerableContentDidChange();
});
}

View File

@ -15,7 +15,7 @@ export default createWidget('post-stream', {
const result = [];
const before = attrs.gaps && attrs.gaps.before ? attrs.gaps.before : {};
const after = attrs.gaps && attrs.gaps.before ? attrs.gaps.after : {};
const after = attrs.gaps && attrs.gaps.after ? attrs.gaps.after : {};
let prevPost;
let prevDate;