Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Tidy up timelineRenderingType to be passed over context#7872

Merged
t3chguy merged 2 commits intodevelopfrom
t3chguy/tidy-trt
Feb 24, 2022
Merged

Tidy up timelineRenderingType to be passed over context#7872
t3chguy merged 2 commits intodevelopfrom
t3chguy/tidy-trt

Conversation

@t3chguy
Copy link
Copy Markdown
Member

@t3chguy t3chguy commented Feb 22, 2022


This change is marked as an internal change (Task), so will not be included in the changelog.

Preview: https://pr7872--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

@t3chguy t3chguy added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Feb 22, 2022
@t3chguy t3chguy requested a review from a team as a code owner February 22, 2022 14:01
Copy link
Copy Markdown
Contributor

@kerryarchibald kerryarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dis.dispatch({
...payload,
dis.dispatch<ComposerInsertPayload>({
...(payload as ComposerInsertPayload),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use a union type on the signature payload: ActionPayload | ComposerInsertPayload | etc then the switch will do the type assertion and the cast of payload here won't be needed.

Copy link
Copy Markdown
Member Author

@t3chguy t3chguy Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

payload: ActionPayload | ComposerInsertPayload doesn't work, to my knowledge we'd need to eliminate ActionPayload and only use the union type of the actual cases, most of the actual Payload types are missing definitions at this time.

image

@t3chguy t3chguy merged commit fe2fceb into develop Feb 24, 2022
@t3chguy t3chguy deleted the t3chguy/tidy-trt branch February 24, 2022 11:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants