2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +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

@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/wrap/vertical_layout_reorder.h"
#include "ui/text/format_values.h" // Ui::FormatPhone
#include "ui/text/text_utilities.h"
#include "ui/text/text_options.h"
#include "ui/special_buttons.h"
#include "ui/empty_userpic.h"
#include "dialogs/ui/dialogs_layout.h"
@@ -765,7 +766,14 @@ void MainMenu::paintEvent(QPaintEvent *e) {
p.setFont(st::semiboldFont);
p.setPen(st::windowBoldFg);
_controller->session().user()->nameText().drawLeftElided(
const auto user = _controller->session().user();
if (_nameVersion < user->nameVersion()) {
_name.setText(
st::msgNameStyle,
user->name(),
Ui::NameTextOptions());
}
_name.drawLeftElided(
p,
st::mainMenuCoverNameLeft,
st::mainMenuCoverNameTop,