2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update all messages in case of chat reactions toggle.

This commit is contained in:
John Preston
2021-12-29 01:06:01 +03:00
parent ec16ca7df7
commit a8bc7baa70
10 changed files with 70 additions and 25 deletions

View File

@@ -763,7 +763,13 @@ PeerId ChannelData::groupCallDefaultJoinAs() const {
void ChannelData::setAllowedReactions(std::vector<QString> list) {
if (_allowedReactions != list) {
const auto toggled = (_allowedReactions.empty() != list.empty());
_allowedReactions = std::move(list);
if (toggled) {
owner().reactions().updateAllInHistory(
this,
!_allowedReactions.empty());
}
session().changes().peerUpdated(this, UpdateFlag::Reactions);
}
}