2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Toggle reactions from the list under the message.

This commit is contained in:
John Preston
2021-12-21 13:23:59 +00:00
parent b5edaf4c23
commit 2991c3c17f
7 changed files with 93 additions and 6 deletions

View File

@@ -276,6 +276,10 @@ void MessageReactions::add(const QString &reaction) {
_item->history()->owner().requestItemResize(_item);
}
void MessageReactions::remove() {
add(QString());
}
void MessageReactions::set(
const QVector<MTPReactionCount> &list,
bool ignoreChosen) {
@@ -313,6 +317,10 @@ const base::flat_map<QString, int> &MessageReactions::list() const {
return _list;
}
bool MessageReactions::empty() const {
return _list.empty();
}
QString MessageReactions::chosen() const {
return _chosen;
}