diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp index 5e1771871..2cc92f331 100644 --- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp @@ -111,8 +111,8 @@ bool IconGraphic::isCounterNeeded(const State &state) const { } int IconGraphic::counterSlice(int counter) const { - return (counter >= 1000) - ? (1000 + (counter % 100)) + return (counter >= 100) + ? (100 + (counter % 10)) : counter; } diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index f81a5784a..1db1575b2 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -260,8 +260,6 @@ QIcon CreateIcon(Main::Session *session, bool returnNullIfDefault) { } QImage GenerateCounterLayer(CounterLayerArgs &&args) { - // platform/linux/main_window_linux depends on count used the same - // way for all the same (count % 1000) values. const auto count = args.count.value(); const auto text = (count < 1000) ? QString::number(count) @@ -338,6 +336,8 @@ QImage GenerateCounterLayer(CounterLayerArgs &&args) { } QImage WithSmallCounter(QImage image, CounterLayerArgs &&args) { + // platform/linux/tray_linux depends on count used the same + // way for all the same (count % 100) values. const auto count = args.count.value(); const auto text = (count < 100) ? QString::number(count)