Merge pull request #1774 from Integral-Tech/add-trayicon-tooltip

Add number of unread messages to tray icon toolTip
This commit is contained in:
DeepBlueV7.X 2024-08-04 11:56:55 +00:00 committed by GitHub
commit 50f9edfe19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,6 +129,13 @@ TrayIcon::setUnreadCount(int count)
previousCount = count; previousCount = count;
} }
#endif #endif
QString toolTip = QLatin1String("nheko");
if (count > 0) {
toolTip.append(tr("\n%n unread message(s)", "", count));
}
setToolTip(toolTip);
} }
#include "moc_TrayIcon.cpp" #include "moc_TrayIcon.cpp"