Commit bf3293eb authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

gtk: hide badge if there is no unread message

parent 7b5da68f
......@@ -39,8 +39,9 @@ int unread_messages_count() {
void linphone_gtk_update_badge_count() {
ms_error("%d\n", unread_messages_count());
[[NSApp dockTile] setBadgeLabel:[NSString stringWithFormat:@"%d", unread_messages_count()]];
int count = unread_messages_count();
NSString* badgeStr = (count > 0) ? [NSString stringWithFormat:@"%d", count] : @"";
[[NSApp dockTile] setBadgeLabel:badgeStr];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment