FIX: If last post was deleted the gap was not displayed
This commit is contained in:
parent
2998fe1ee5
commit
9ec44f755c
|
@ -28,6 +28,7 @@ export default MountWidget.extend({
|
||||||
return this.getProperties('posts',
|
return this.getProperties('posts',
|
||||||
'canCreatePost',
|
'canCreatePost',
|
||||||
'multiSelect',
|
'multiSelect',
|
||||||
|
'gaps',
|
||||||
'selectedQuery',
|
'selectedQuery',
|
||||||
'selectedPostsCount',
|
'selectedPostsCount',
|
||||||
'searchService');
|
'searchService');
|
||||||
|
|
|
@ -280,6 +280,7 @@ export default RestModel.extend({
|
||||||
if (idx !== -1) {
|
if (idx !== -1) {
|
||||||
stream.pushObjects(gap);
|
stream.pushObjects(gap);
|
||||||
return this.appendMore().then(() => {
|
return this.appendMore().then(() => {
|
||||||
|
delete this.get('gaps.after')[postId];
|
||||||
this.get('stream').enumerableContentDidChange();
|
this.get('stream').enumerableContentDidChange();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default createWidget('post-stream', {
|
||||||
const result = [];
|
const result = [];
|
||||||
|
|
||||||
const before = attrs.gaps && attrs.gaps.before ? attrs.gaps.before : {};
|
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 prevPost;
|
||||||
let prevDate;
|
let prevDate;
|
||||||
|
|
Loading…
Reference in New Issue