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

Dialog action fix #678

Merged
merged 7 commits into from
Sep 7, 2015
Merged

Dialog action fix #678

merged 7 commits into from
Sep 7, 2015

Conversation

PeterStaev
Copy link
Contributor

If the user wants to display only action sheet buttons w/o any text and
he sends null as message, the empty string causes an empty title to be
shown above the buttons. Having null instead, completely eliminates the
empty space.

If the user wants to display only action sheet buttons w/o any text and
he sends null as message, the empty string causes an empty title to be
shown above the buttons. Having null instead, completely eliminates the
empty space.
@ns-bot
Copy link

ns-bot commented Sep 4, 2015

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Sep 4, 2015

Please sign CLA at http://www.nativescript.org/cla

@ns-bot ns-bot added cla: no and removed cla: yes labels Sep 4, 2015
…cel-fix

Fix for cancel backswipe gesture. It was broken with the implementati…
@hshristov
Copy link
Contributor

@PeterStaev
You are absolutely correct. The problem I see is that there should be another parameter for title and we should call the native api with the correct parameters. Right now we pass the message as Title in both platforms and we pass "" as message.

@PeterStaev
Copy link
Contributor Author

@hshristov I agree this is a much better idea!

If the user wants to display only action sheet buttons w/o any text and
he sends null as message, the empty string causes an empty title to be
shown above the buttons. Having null instead, completely eliminates the
empty space.
@PeterStaev
Copy link
Contributor Author

Added the title option. In order to not cause much problems for existing code using the dialog.action:
For iOS7 - Continue to send the message as the title of the UIActionSheet since there is no message there.
For iOS8+ - Send both title and message to the UIAlertController
For Android - If there is a title sent, pass both title and message to the AlertDialog. If there is no title, pass the message as title for the AlertDialog

@enchev
Copy link
Contributor

enchev commented Sep 7, 2015

run ci

@ns-bot
Copy link

ns-bot commented Sep 7, 2015

@enchev
Copy link
Contributor

enchev commented Sep 7, 2015

👍

@enchev enchev added cla: yes and removed cla: no labels Sep 7, 2015
enchev pushed a commit that referenced this pull request Sep 7, 2015
@enchev enchev merged commit 0e61d1a into NativeScript:master Sep 7, 2015
@PeterStaev PeterStaev deleted the dialog-action-fix branch September 7, 2015 15:01
@lock
Copy link

lock bot commented Aug 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants