mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Toggle reactions from the list under the message.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -90,9 +90,11 @@ public:
|
||||
explicit MessageReactions(not_null<HistoryItem*> item);
|
||||
|
||||
void add(const QString &reaction);
|
||||
void remove();
|
||||
void set(const QVector<MTPReactionCount> &list, bool ignoreChosen);
|
||||
[[nodiscard]] const base::flat_map<QString, int> &list() const;
|
||||
[[nodiscard]] QString chosen() const;
|
||||
[[nodiscard]] bool empty() const;
|
||||
|
||||
private:
|
||||
void sendRequest();
|
||||
|
Reference in New Issue
Block a user