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

notification issue fixed #1237

Closed
wants to merge 2 commits into from
Closed

Conversation

mebjas
Copy link

@mebjas mebjas commented Mar 21, 2016

Signed-off-by: Minhaz A V minhazav@gmail.com

Changes:
getInitialState from Notification class and show (or not) the toolbar depending on response. Listener to deal with close dialog persistently modified.

@@ -32,6 +37,7 @@ module.exports = React.createClass({
},

render: function() {
if (this.state.showToolbar != true) return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's legal to return null here. But anyway, this logic is in the wrong place; the logic for whether to show the toolbar or not belongs in the parent component (MatrixChat).

MatrixChat.render already has:

... if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
            topBar = <MatrixToolbar />;
}

You just need to update Notifier.isToolbarHidden.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, though if the user clicked on block in the notification permission dialog, we are going to show you have disabled desktop notification right? The logic for that would come here right?

@mebjas
Copy link
Author

mebjas commented Mar 23, 2016

Well with that all logic moves to react-sdk I'll close this pull.

@mebjas mebjas closed this Mar 23, 2016
@mebjas mebjas deleted the develop-notif branch March 23, 2016 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants