Add number of unread messages to tray icon toolIip

This commit is contained in:
Integral 2024-07-07 23:28:36 +08:00
parent 0c222689f4
commit 01cc12fede
No known key found for this signature in database
GPG key ID: 06313911057DD5A8

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%1 unread message(s)").arg(count));
}
setToolTip(toolTip);
} }
#include "moc_TrayIcon.cpp" #include "moc_TrayIcon.cpp"