2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Rename linked-chat to discussion-link.

This commit is contained in:
John Preston
2025-05-06 10:22:29 +04:00
parent 1d2f713673
commit f96f478470
17 changed files with 103 additions and 103 deletions

View File

@@ -275,22 +275,22 @@ const ChannelLocation *ChannelData::getLocation() const {
return mgInfo ? mgInfo->getLocation() : nullptr;
}
void ChannelData::setLinkedChat(ChannelData *linked) {
if (_linkedChat != linked) {
_linkedChat = linked;
void ChannelData::setDiscussionLink(ChannelData *linked) {
if (_discussionLink != linked) {
_discussionLink = linked;
if (const auto history = owner().historyLoaded(this)) {
history->forceFullResize();
}
session().changes().peerUpdated(this, UpdateFlag::ChannelLinkedChat);
session().changes().peerUpdated(this, UpdateFlag::DiscussionLink);
}
}
ChannelData *ChannelData::linkedChat() const {
return _linkedChat.value_or(nullptr);
ChannelData *ChannelData::discussionLink() const {
return _discussionLink.value_or(nullptr);
}
bool ChannelData::linkedChatKnown() const {
return _linkedChat.has_value();
bool ChannelData::discussionLinkKnown() const {
return _discussionLink.has_value();
}
void ChannelData::setMembersCount(int newMembersCount) {
@@ -1236,9 +1236,9 @@ void ApplyChannelUpdate(
channel->setLocation(MTP_channelLocationEmpty());
}
if (const auto chat = update.vlinked_chat_id()) {
channel->setLinkedChat(channel->owner().channelLoaded(chat->v));
channel->setDiscussionLink(channel->owner().channelLoaded(chat->v));
} else {
channel->setLinkedChat(nullptr);
channel->setDiscussionLink(nullptr);
}
if (const auto history = channel->owner().historyLoaded(channel)) {
if (const auto available = update.vavailable_min_id()) {