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