Merge pull request #6636 from BlueWallet/push

FIX: Notification toggle was stopped by an undefined object
This commit is contained in:
GLaDOS 2024-06-01 10:55:10 +00:00 committed by GitHub
commit 720a47cbd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -152,7 +152,7 @@ function Notifications(props) {
message: loc.notifications.would_you_like_to_receive_notifications, message: loc.notifications.would_you_like_to_receive_notifications,
options, options,
cancelButtonIndex: 0, // Assuming 'no and don't ask' is still treated as the cancel action cancelButtonIndex: 0, // Assuming 'no and don't ask' is still treated as the cancel action
anchor: findNodeHandle(anchor.current), anchor: anchor ? findNodeHandle(anchor.current) : undefined,
}, },
buttonIndex => { buttonIndex => {
switch (buttonIndex) { switch (buttonIndex) {

View file

@ -8,8 +8,10 @@ export default class ActionSheet {
InteractionManager.runAfterInteractions(() => { InteractionManager.runAfterInteractions(() => {
const iosOptions = { const iosOptions = {
...options, ...options,
anchor: options.anchor,
}; };
if (options.anchor) {
iosOptions.anchor = options.anchor;
}
ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion); ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion);
}); });
} }