We don't care about the timeline (just fire and forget to load the event)#2849
We don't care about the timeline (just fire and forget to load the event)#2849MadLittleMods wants to merge 1 commit intodevelopfrom
Conversation
Split out from #2521 Context: #2521 (comment)
| await this.client.getEventTimeline(this.timelineSet, initialEventId) | ||
| .then(initFields); | ||
| return; |
There was a problem hiding this comment.
The function signature is Promise<void> here. We shouldn't return anything here.
robintown
left a comment
There was a problem hiding this comment.
I'm confused. It doesn't look like this changes any behavior?
| } else if (initialEventId) { | ||
| return this.client.getEventTimeline(this.timelineSet, initialEventId) | ||
| await this.client.getEventTimeline(this.timelineSet, initialEventId) | ||
| .then(initFields); |
There was a problem hiding this comment.
this.client.getEventTimeline(...).then(initFields) was already a Promise<void>?
There was a problem hiding this comment.
Sorry, I think I confused my sentiment with this spot (which is totally different, oops) that I mentioned in #2521 (comment) with some blind copy-pasting out of that PR diff. I'm trying to get back to speed with everything going on in that stale PR.
And if we actually wanted to refactor to a fire and forget getEventTimeline pattern here, I'd need to adjust how initFields is done here.
I'll have a think on this one whether it's relevant. Good shout!
|
removing review requests while this is in draft |
We don't care about the timeline (just fire and forget to load the event).
Split out from #2521
Checklist
Sign-off given on the changes (see CONTRIBUTING.md)This change is marked as an internal change (Task), so will not be included in the changelog.