2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Add a tab with "Who Seen" to "Who Reacted" box.

This commit is contained in:
John Preston
2022-01-18 20:46:10 +03:00
parent 74a28ffdf7
commit c8f7a8c795
9 changed files with 252 additions and 137 deletions

View File

@@ -352,6 +352,10 @@ void Action::paint(Painter &p) {
void Action::refreshText() {
const auto usersCount = int(_content.participants.size());
const auto onlySeenCount = ranges::count(
_content.participants,
QString(),
&WhoReadParticipant::reaction);
const auto count = std::max(_content.fullReactionsCount, usersCount);
_text.setMarkedText(
_st.itemStyle,
@@ -365,7 +369,8 @@ void Action::refreshText() {
_content.fullReactionsCount,
_content.fullReadCount)
: (_content.type == WhoReadType::Reacted
|| (count > 0 && _content.fullReactionsCount > usersCount))
|| (count > 0 && _content.fullReactionsCount > usersCount)
|| (count > 0 && onlySeenCount == 0))
? (count
? tr::lng_context_seen_reacted(
tr::now,