FIX: regression not showing excerpts in mobile timeline

I think this is a result of: 87f0b56191
This commit is contained in:
Sam Saffron 2019-11-07 16:09:41 +11:00
parent c5df853dea
commit cf0f2c70cd

View File

@ -188,11 +188,7 @@ createWidget("timeline-scrollarea", {
if (this.state.position !== result.scrollPosition) {
this.state.position = result.scrollPosition;
this.sendWidgetAction(
"updatePosition",
result.position,
result.scrollPosition
);
this.sendWidgetAction("updatePosition", current);
}
return result;
@ -391,7 +387,7 @@ export default createWidget("topic-timeline", {
return { position: null, excerpt: null };
},
updatePosition(postIdx, scrollPosition) {
updatePosition(scrollPosition) {
if (!this.attrs.fullScreen) {
return;
}
@ -407,8 +403,7 @@ export default createWidget("topic-timeline", {
}
// we have an off by one, stream is zero based,
// postIdx is 1 based
stream.excerpt(postIdx - 1).then(info => {
stream.excerpt(scrollPosition - 1).then(info => {
if (info && this.state.position === scrollPosition) {
let excerpt = "";