Merge tag 'v7.0.4' into dev

This commit is contained in:
AlexeyZavar
2026-07-23 06:48:00 +03:00
1335 changed files with 217894 additions and 24157 deletions
+18 -10
View File
@@ -323,6 +323,22 @@ void UserData::setPersonalChannel(ChannelId channelId, MsgId messageId) {
}
}
ChannelId UserData::linkedCommunityId() const {
return _linkedCommunityId;
}
void UserData::setLinkedCommunityId(ChannelId id) {
if (_linkedCommunityId == id) {
return;
}
_linkedCommunityId = id;
if (const auto history = owner().historyLoaded(this)) {
history->updateCommunityRegistration();
history->updateChatListSortPosition();
history->updateChatListExistence();
}
}
UserId UserData::botManagerId() const {
return _botManagerId;
}
@@ -369,25 +385,16 @@ void UserData::setName(
bool changeName = !filteredFirstName.isEmpty() || !filteredLastName.isEmpty();
QString newFullName;
if (changeName && filteredFirstName.trimmed().isEmpty()) {
firstName = filteredLastName;
lastName = QString();
newFullName = firstName;
} else {
if (changeName) {
firstName = filteredFirstName;
lastName = filteredLastName;
}
newFullName = lastName.isEmpty()
? firstName
: tr::lng_full_name(
tr::now,
lt_first_name,
firstName,
lt_last_name,
lastName);
}
const auto newFullName = langFullName(firstName, lastName);
updateNameDelayed(newFullName, newPhoneName, newUsername);
}
@@ -949,6 +956,7 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
user->setAbout(qs(update.vabout().value_or_empty()));
user->setCommonChatsCount(update.vcommon_chats_count().v);
user->setPeerGiftsCount(update.vstargifts_count().value_or_empty());
user->setMainProfileTab(Data::ParseProfileTab(update.vmain_tab()));
user->checkFolder(update.vfolder_id().value_or_empty());
if (const auto theme = update.vtheme()) {
theme->match([&](const MTPDchatTheme &data) {