mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix first my reaction userpic in groups.
This commit is contained in:
parent
9a451a1423
commit
4996d90782
1 changed files with 6 additions and 0 deletions
|
@ -794,11 +794,17 @@ void HistoryItem::addReaction(const QString &reaction) {
|
|||
void HistoryItem::toggleReaction(const QString &reaction) {
|
||||
if (!_reactions) {
|
||||
_reactions = std::make_unique<Data::MessageReactions>(this);
|
||||
const auto canViewReactions = !isDiscussionPost()
|
||||
&& (history()->peer->isChat() || history()->peer->isMegagroup());
|
||||
if (canViewReactions) {
|
||||
_flags |= MessageFlag::CanViewReactions;
|
||||
}
|
||||
_reactions->add(reaction);
|
||||
} else if (_reactions->chosen() == reaction) {
|
||||
_reactions->remove();
|
||||
if (_reactions->empty()) {
|
||||
_reactions = nullptr;
|
||||
_flags &= ~MessageFlag::CanViewReactions;
|
||||
history()->owner().notifyItemDataChange(this);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue