Skip to content

Commit

Permalink
Clear notification count after pressing notification Issue #34 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
0xWDG committed Jan 4, 2016
1 parent 3465234 commit 0396b49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WebShell/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
func userNotificationCenter(center: NSUserNotificationCenter, didActivateNotification notification: NSUserNotification) {
// Open window if user clicked on notification!
mainWindow!.makeKeyAndOrderFront(self)

// @wdg Clear notification count
// Issue: #34
NSApplication.sharedApplication().dockTile.badgeLabel = ""
NSNotificationCenter.defaultCenter().postNotificationName("clearNotificationCount", object: nil)
}

@IBAction func goHome(sender: AnyObject) {
Expand Down

0 comments on commit 0396b49

Please sign in to comment.