2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Add 'Count unread messages' option.

This commit is contained in:
John Preston
2018-12-04 14:32:06 +04:00
parent 71efd10c83
commit 6562a1f6af
21 changed files with 353 additions and 119 deletions

View File

@@ -427,7 +427,9 @@ void MainWindow::updateControlsGeometry() {
void MainWindow::updateUnreadCounter() {
if (!Global::started() || App::quitting()) return;
auto counter = App::histories().unreadBadge();
const auto counter = AuthSession::Exists()
? App::histories().unreadBadge()
: 0;
_titleText = (counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram");
unreadCounterChangedHook();