HomePhabricator
Diffusion Comm f8b83d7961d2

[native] Split onClosing and onClosed params to SIWEPanel

Description

[native] Split onClosing and onClosed params to SIWEPanel

Summary:
Today, SIWEPanel takes a single onClose that gets called in two scenarios:

  1. The user has closed the bottom sheet, and its dismissal animation is beginning
  2. The dismissal animation has completed

In the case of FullscreenSIWEPanel (the only existing usage), we don't distinguish between these two because we need to animate back to the prompt screen anyways. We want to start that animation as soon as possible, and can defer the "unrender" of SIWEPanel until that animation completes.

However, in the upcoming new usage for the ConnectEthereum screen, we don't have any need for a secondary animation like that. We can't "unrender" SIWEPanel until the primary animation has completed, and so our options are to either sleep for some time (bad), or to separate these two callbacks (better).

Test Plan:
I tested all ways of closing the SIWEPanel:

  1. Pressing the main LoggedOutModal back button
  2. Swiping the bottom sheet closed
  3. Pressing the close button inside the WebView. (Note that pressing the WalletConnect close button doesn't work, but this doesn't work currently anyways)

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on May 16 2023, 11:56 AM
Reviewer
atul
Differential Revision
D7843: [native] Split onClosing and onClosed params to SIWEPanel
Parents
rCOMMcd377781d242: Add thumbhash field to multimedia messages
Branches
Unknown
Tags
Unknown