mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 00:47:44 +08:00
Revert "FIX: The internal position on the topic timeline is a scroll position"
This reverts commit 9c1a713c6e6f9afb6ce1e078a80ec1a124def540.
This commit is contained in:
parent
6a417c308f
commit
063a1d4077
@ -187,11 +187,8 @@ createWidget("timeline-scrollarea", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.position !== result.scrollPosition) {
|
if (this.state.position !== result.scrollPosition) {
|
||||||
this.sendWidgetAction(
|
this.state.position = result.scrollPosition;
|
||||||
"updatePosition",
|
this.sendWidgetAction("updatePosition", current);
|
||||||
result.current,
|
|
||||||
result.scrollPosition
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -390,7 +387,7 @@ export default createWidget("topic-timeline", {
|
|||||||
return { position: null, excerpt: null };
|
return { position: null, excerpt: null };
|
||||||
},
|
},
|
||||||
|
|
||||||
updatePosition(postIdx, scrollPosition) {
|
updatePosition(scrollPosition) {
|
||||||
if (!this.attrs.fullScreen) {
|
if (!this.attrs.fullScreen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -406,8 +403,7 @@ export default createWidget("topic-timeline", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we have an off by one, stream is zero based,
|
// we have an off by one, stream is zero based,
|
||||||
// postIdx is 1 based
|
stream.excerpt(scrollPosition - 1).then(info => {
|
||||||
stream.excerpt(postIdx - 1).then(info => {
|
|
||||||
if (info && this.state.position === scrollPosition) {
|
if (info && this.state.position === scrollPosition) {
|
||||||
let excerpt = "";
|
let excerpt = "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user