mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Update topic mute state on history mute changes.
This commit is contained in:
@@ -452,8 +452,19 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupMuteToggle() {
|
||||
if (button == Qt::RightButton) {
|
||||
return true;
|
||||
}
|
||||
if (notifySettings->isMuted(peer)) {
|
||||
notifySettings->update(peer, { .unmute = true });
|
||||
const auto topic = topicRootId
|
||||
? peer->forumTopicFor(topicRootId)
|
||||
: nullptr;
|
||||
Assert(!topicRootId || topic != nullptr);
|
||||
const auto is = topic
|
||||
? notifySettings->isMuted(topic)
|
||||
: notifySettings->isMuted(peer);
|
||||
if (is) {
|
||||
if (topic) {
|
||||
notifySettings->update(topic, { .unmute = true });
|
||||
} else {
|
||||
notifySettings->update(peer, { .unmute = true });
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user