chat: add dock badge

Display unread count message on Ring dock icon

Change-Id: Ia137f66689838dddd1bbce6c8b486c6ceee77682
Tuleap: #202
diff --git a/src/AppDelegate.mm b/src/AppDelegate.mm
index 77d58e5..111de1c 100644
--- a/src/AppDelegate.mm
+++ b/src/AppDelegate.mm
@@ -83,6 +83,13 @@
                      });
 
 
+    QObject::connect(&Media::RecordingModel::instance(),
+                     &Media::RecordingModel::unreadMessagesCountChanged,
+                     [=](int unreadCount) {
+                         NSDockTile *tile = [[NSApplication sharedApplication] dockTile];
+                         NSString* label = unreadCount ? [NSString stringWithFormat:@"%d", unreadCount]: @"";
+                         [tile setBadgeLabel:label];
+                     });
 
     QObject::connect(&Media::RecordingModel::instance(),
                      &Media::RecordingModel::newTextMessage,