mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use "My Story" instead of name in viewer.
This commit is contained in:
parent
dd9ea29334
commit
7e18ecfb78
2 changed files with 7 additions and 2 deletions
|
@ -236,7 +236,9 @@ void UserpicBadge::updateGeometry() {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] TextWithEntities ComposeName(HeaderData data) {
|
[[nodiscard]] TextWithEntities ComposeName(HeaderData data) {
|
||||||
auto result = Ui::Text::Bold(data.user->shortName());
|
auto result = Ui::Text::Bold(data.user->isSelf()
|
||||||
|
? tr::lng_stories_my_name(tr::now)
|
||||||
|
: data.user->shortName());
|
||||||
if (data.fullCount) {
|
if (data.fullCount) {
|
||||||
result.append(QString::fromUtf8(" \xE2\x80\xA2 %1/%2"
|
result.append(QString::fromUtf8(" \xE2\x80\xA2 %1/%2"
|
||||||
).arg(data.fullIndex + 1
|
).arg(data.fullIndex + 1
|
||||||
|
|
|
@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_photo_media.h"
|
#include "data/data_photo_media.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "lang/lang_keys.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "media/stories/media_stories_controller.h"
|
#include "media/stories/media_stories_controller.h"
|
||||||
#include "media/stories/media_stories_view.h"
|
#include "media/stories/media_stories_view.h"
|
||||||
|
@ -339,7 +340,9 @@ QImage Sibling::nameImage(const SiblingLayout &layout) {
|
||||||
.linkFontOver = font,
|
.linkFontOver = font,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const auto text = _peer->shortName();
|
const auto text = _peer->isSelf()
|
||||||
|
? tr::lng_stories_my_name(tr::now)
|
||||||
|
: _peer->shortName();
|
||||||
if (_nameText != text) {
|
if (_nameText != text) {
|
||||||
_name.reset();
|
_name.reset();
|
||||||
_nameText = text;
|
_nameText = text;
|
||||||
|
|
Loading…
Add table
Reference in a new issue