2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 15:15:13 +00:00

Set name / phone texts on-demand.

This commit is contained in:
John Preston
2022-08-09 14:12:19 +03:00
parent ceb7d5f238
commit 8bc807dc40
98 changed files with 426 additions and 260 deletions

View File

@@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwidget.h"
#include "main/main_session.h"
#include "main/main_session_settings.h"
#include "ui/text/text_options.h"
#include "history/history_item.h"
#include "history/history.h"
#include "styles/style_dialogs.h" // st::dialogsTextWidthMin
@@ -163,6 +164,18 @@ void Entry::notifyUnreadStateChange(const UnreadState &wasState) {
}
}
const Ui::Text::String &Entry::chatListNameText() const {
const auto version = chatListNameVersion();
if (_chatListNameVersion < version) {
_chatListNameVersion = version;
_chatListNameText.setText(
st::msgNameStyle,
chatListName(),
Ui::NameTextOptions());
}
return _chatListNameText;
}
void Entry::setChatListExistence(bool exists) {
if (exists && _sortKeyInChatList) {
owner().refreshChatListEntry(this);