Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3515719
D6009.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6009.diff
View Options
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -556,7 +556,7 @@
let siwePanel;
if (this.state.mode === 'siwe') {
- siwePanel = <SIWEPanel />;
+ siwePanel = <SIWEPanel onClose={this.goBackToPrompt} />;
}
const backgroundSource = { uri: splashBackgroundURI };
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -29,7 +29,10 @@
getSIWENonceActionTypes,
);
-function SIWEPanel(): React.Node {
+type Props = {
+ +onClose: () => mixed,
+};
+function SIWEPanel(props: Props): React.Node {
const navContext = React.useContext(NavContext);
const dispatchActionPromise = useDispatchActionPromise();
const registerAction = useServerCall(register);
@@ -129,6 +132,16 @@
[],
);
+ const { onClose } = props;
+ const onBottomSheetChange = React.useCallback(
+ (index: number) => {
+ if (index === -1) {
+ onClose();
+ }
+ },
+ [onClose],
+ );
+
let bottomSheet;
if (nonce) {
bottomSheet = (
@@ -136,6 +149,8 @@
snapPoints={snapPoints}
backgroundStyle={handleStyle}
handleIndicatorStyle={bottomSheetHandleIndicatorStyle}
+ enablePanDownToClose={true}
+ onChange={onBottomSheetChange}
>
<WebView
source={source}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 9:48 AM (14 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694397
Default Alt Text
D6009.diff (1 KB)
Attached To
Mode
D6009: [native] Let the user dismiss the SIWEPanel with a gesture
Attached
Detach File
Event Timeline
Log In to Comment