mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 11:52:58 +00:00
Merge tag 'v7.0.4' into dev
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user