Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some unread counters cut large counts down to their last digits. The unread badge on the top bar back button, the macOS Dock badge and the window icon counter showed a count of 1,483 as "..83", which doesn't tell how many unread there are.
Other unread badges already shorten counts to thousands instead: the top peers strip and the recent chats in search suggestions, each with its own copy of
(count < 1000) ? number : (count / 1000) + 'K'.Changes
FormatUnreadCounterShort()is added toui/unread_counter_format, next toFormatUnreadCounter(). It keeps that format and adds millions, so counts are shown as 999, 1K, 145K or 1M.Window::GenerateCounterLayer(), the top peers strip and the search suggestions all use it.The tray icon counters,
Window::WithSmallCounter()andPlaceCounter()on macOS, have room for about two digits and keep cutting counts from 100 on. The Linux tray also caches its icons based on that format.Testing
Built and tested on macOS (Debug):
The window icon counter is drawn only on Windows and was not tested.