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:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user