HomePhabricator
Diffusion Comm beb8c9a17ad6

[native] Default parsedSpoilerIdentifier to null

Description

[native] Default parsedSpoilerIdentifier to null

Summary:
Not a big deal, but @atul and I decided that we should default parsedSpoilerIdentifier to null in the event of an unexpected value. Note that I still need to explicity check if parsedSpoilerIdentifier !== null, since if I just checked if (parsedSpoilerIdentifier) and parsedSpoilerIdentifier = 0, it would make the condition false.

https://linear.app/comm/issue/ENG-2269/investigate-if-defaulting-parsedspoilerindex-to-1-is-the-best-solution

Test Plan: Tested both spoilers mid-text and at the start of the text to make sure they still work as expected.

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D5839

Details

Provenance
rohanAuthored on Dec 7 2022, 9:28 AM
Reviewer
atul
Differential Revision
D5839: [native] Default parsedSpoilerIdentifier to null
Parents
rCOMM9a7227ac0ef8: [lib/native/keyserver] included RawReactionMessageInfo to RawMessageInfo and…
Branches
Unknown
Tags
Unknown