mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Display custom emoji reactions under messages.
This commit is contained in:
@@ -592,8 +592,13 @@ bool WhoReadExists(not_null<HistoryItem*> item) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WhoReactedExists(not_null<HistoryItem*> item) {
|
||||
return item->canViewReactions() || WhoReadExists(item);
|
||||
bool WhoReactedExists(
|
||||
not_null<HistoryItem*> item,
|
||||
WhoReactedList list) {
|
||||
if (item->canViewReactions() || WhoReadExists(item)) {
|
||||
return true;
|
||||
}
|
||||
return (list == WhoReactedList::One) && item->history()->peer->isUser();
|
||||
}
|
||||
|
||||
rpl::producer<Ui::WhoReadContent> WhoReacted(
|
||||
|
@@ -24,8 +24,15 @@ struct ReactionId;
|
||||
|
||||
namespace Api {
|
||||
|
||||
enum class WhoReactedList {
|
||||
All,
|
||||
One,
|
||||
};
|
||||
|
||||
[[nodiscard]] bool WhoReadExists(not_null<HistoryItem*> item);
|
||||
[[nodiscard]] bool WhoReactedExists(not_null<HistoryItem*> item);
|
||||
[[nodiscard]] bool WhoReactedExists(
|
||||
not_null<HistoryItem*> item,
|
||||
WhoReactedList list);
|
||||
|
||||
struct WhoReadList {
|
||||
std::vector<PeerId> list;
|
||||
|
Reference in New Issue
Block a user