Skip to content

Native Notifications - #57

Merged
manosim merged 14 commits into
masterfrom
native-notifications
Jun 14, 2015
Merged

manosim merged 14 commits into
masterfrom
native-notifications

Conversation

@manosim

@manosim manosim commented Jun 12, 2015

Copy link
Copy Markdown
Member

Review after #56 .

screen shot 2015-06-13 at 01 40 03

screen shot 2015-06-13 at 01 31 08

@manosim manosim added this to the Release 0.0.13 milestone Jun 13, 2015
@manosim manosim mentioned this pull request Jun 13, 2015
Comment thread src/js/stores/sound-notification.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This keeps the functions more pure, and I believe correctly picks the latest notification. I think the existing code would get the last of the new notifications.

// Check if notification is already in the store.
var newNotifications = _.filter(response, function (obj) {
  return !_.contains(self._previousNotifications, obj.id);
});

// Play Sound / Show Notification.
if (newNotifications && newNotifications.length) {
  if (playSound) {
    self.playSound();
  }
  if (showNotifications) {
    this.showNotification(countNew, response, {
      full_name: newNotifications[0].repository.full_name,
      subject: newNotifications[0].subject.title
    });
  }
}

@JakeSidSmith

Copy link
Copy Markdown
Contributor

🚀

manosim pushed a commit that referenced this pull request Jun 14, 2015
@manosim
manosim merged commit ec15749 into master Jun 14, 2015
@manosim
manosim deleted the native-notifications branch June 14, 2015 18:38
@manosim manosim added release Release and removed review needed labels Jun 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Release

Development

Successfully merging this pull request may close these issues.

2 participants