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

Don't close notification until verification succeeds. #68

Closed
wants to merge 1 commit into from

Conversation

Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
@tnull
Copy link
Contributor

@tnull tnull commented Mar 9, 2016

This fixes #62: the notification bar is hindered from being closed by the verification dialog.
However, while the XUL documentation states this can be done by throwing an error in the eventCallback function of appendNotification, this did not work for me. I instead put the throw into the callback function of the button.

I also opened a post on stackoverflow on this issue, since I don't see why the method described in the documentation should not work.

@@ -377,6 +377,9 @@ var ui = {
callback: function() {
let name = uiConv.target.normalizedName;
ui.openAuth(window, otrAuth, name, "start", uiConv);

// prevent closing of notification bar when the button is hit
throw new Error('prevent nb close');
return false;
Copy link
Owner

@arlolra arlolra Mar 9, 2016

Throwing an error is undesirable, but thankfully I think returning true here seems to work.

Copy link
Contributor Author

@tnull tnull Mar 10, 2016

Yep, this is definitely better style.

@arlolra
Copy link
Owner

@arlolra arlolra commented Mar 9, 2016

Thanks for the pull. Can you amend the patch (after verifying my review) and force push to your branch?

@tnull tnull force-pushed the keep_nudging_verification branch from 1a37aac to a1b79b3 Mar 10, 2016
@tnull
Copy link
Contributor Author

@tnull tnull commented Mar 10, 2016

Ok, my patch is updated to include the return true statement rather than throwing.
And the description how to use the Error in the eventCallback should also be gone from the XUL documentation soon, too (see stackoverflow) .. :)

@arlolra
Copy link
Owner

@arlolra arlolra commented Mar 10, 2016

Great! Merged in 40f7542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment