Skip to content

Commit 0396b49

Browse files
committed
Clear notification count after pressing notification Issue #34 fixed
1 parent 3465234 commit 0396b49

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

WebShell/AppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
4444
func userNotificationCenter(center: NSUserNotificationCenter, didActivateNotification notification: NSUserNotification) {
4545
// Open window if user clicked on notification!
4646
mainWindow!.makeKeyAndOrderFront(self)
47+
48+
// @wdg Clear notification count
49+
// Issue: #34
50+
NSApplication.sharedApplication().dockTile.badgeLabel = ""
51+
NSNotificationCenter.defaultCenter().postNotificationName("clearNotificationCount", object: nil)
4752
}
4853

4954
@IBAction func goHome(sender: AnyObject) {

0 commit comments

Comments
 (0)