Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share Method Multiple Dialogs #18153

Closed
sfm2222 opened this issue Mar 1, 2018 · 3 comments
Closed

Share Method Multiple Dialogs #18153

sfm2222 opened this issue Mar 1, 2018 · 3 comments
Labels
Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.

Comments

@sfm2222
Copy link

sfm2222 commented Mar 1, 2018

I’m using react native share, to share text content. The issue is multiple share dialog are opened over each other on clicking share button multiple times. Even I have disabled button on share click but it is of no use as well.

Expected Behavior

The standard way is if share dialoge is already open, on clicking the share button again the window get closed. How can it be done?

Actual Behavior

Opening multiple share dialogs.

Environment

	"react-native": "0.50.3",

Steps to Reproduce


<Button 
 transparent
 disabled={this.state.isShareDisabled}
  onPress={() => that.onShare(index)}>

onShare() {
    if(!this.state.isShareDisabled)
    {
    this.setState(
        {
            isShareDisabled:true
        }
    )
    Share.share({
      message: “Message test”,
      url: ”www.google.com”,
      title: “Title test”
    }, {
      // Android only:
      dialogTitle: 'Share',
      // iOS only:
      excludedActivityTypes: [
        'com.apple.UIKit.activity.PostToTwitter'
      ]
    }) .then((result) => {
        this.setState(
            {
                isShareDisabled: false,
            }
        )
    })
}
  }
@kelset kelset added the Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. label Mar 1, 2018
@sfm2222
Copy link
Author

sfm2222 commented Mar 1, 2018

@kelset I have already asked on this question stackoverflow. I have received no answer.

Can you tell how to check if share dialog is already open or not.

https://stackoverflow.com/questions/49046409/react-native-share-method-multiple-windows

@hramos
Copy link
Contributor

hramos commented Mar 1, 2018

It looks like your Stack Overflow question was posted six hours ago. It usually takes a bit longer to see an answer there. In any case, lack of answers in Stack Overflow is not a good enough reason to post the question here. I'm going to close the issue as we'd like to focus on bug reports. I hope you understand.

@hramos hramos closed this as completed Mar 1, 2018
@sfm2222
Copy link
Author

sfm2222 commented Mar 2, 2018

@hramos thank you, yes I get your point but I think It is possibly a feature request because I cannot find cancel event for share in the documentation anywhere.

I have found another similar question with a slightly different issue asked on stackoverflow. This is asked 9 months ago and there is no answer to it as well.

https://stackoverflow.com/questions/44095828/react-native-share-method-cancel-event

@facebook facebook locked as resolved and limited conversation to collaborators Mar 1, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: For Stack Overflow A question for Stack Overflow. Applying this label will cause issue to be closed. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants