diff --git a/Telegram/SourceFiles/data/data_forum_topic.cpp b/Telegram/SourceFiles/data/data_forum_topic.cpp index 7285c4c39..7e7998897 100644 --- a/Telegram/SourceFiles/data/data_forum_topic.cpp +++ b/Telegram/SourceFiles/data/data_forum_topic.cpp @@ -165,11 +165,12 @@ TextWithEntities ForumTopicIconWithTitle( MsgId rootId, DocumentId iconId, const QString &title) { + const auto wrapped = st::wrap_rtl(title); return (rootId == ForumTopic::kGeneralId) - ? TextWithEntities{ u"# "_q + title } + ? TextWithEntities{ u"# "_q + wrapped } : iconId - ? Data::SingleCustomEmoji(iconId).append(' ').append(title) - : TextWithEntities{ title }; + ? Data::SingleCustomEmoji(iconId).append(' ').append(wrapped) + : TextWithEntities{ wrapped }; } QString ForumGeneralIconTitle() { diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp index 1202d5aaf..0060eae45 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_message_view.cpp @@ -445,12 +445,13 @@ HistoryView::ItemPreview PreviewWithSender( HistoryView::ItemPreview &&preview, const QString &sender, TextWithEntities topic) { + const auto wrappedSender = st::wrap_rtl(sender); auto senderWithOffset = topic.empty() - ? TextWithTagOffset::FromString(sender) + ? TextWithTagOffset::FromString(wrappedSender) : tr::lng_dialogs_text_from_in_topic( tr::now, lt_from, - { sender }, + { wrappedSender }, lt_topic, std::move(topic), TextWithTagOffset::FromString); diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 3f7da1aa3..277d499e3 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -847,7 +847,7 @@ void MainWindow::updateTitle() { const auto user = (session && !settings.hideAccountName && Core::App().domain().accountsAuthedCount() > 1) - ? session->authedName() + ? st::wrap_rtl(session->authedName()) : QString(); const auto key = (session && !settings.hideChatName) ? session->activeChatCurrent() @@ -864,10 +864,11 @@ void MainWindow::updateTitle() { : history->peer->isSelf() ? tr::lng_saved_messages(tr::now) : history->peer->name(); + const auto wrapped = st::wrap_rtl(name); const auto threadCounter = thread->chatListBadgesState().unreadCounter; const auto primary = (threadCounter > 0) - ? u"(%1) %2"_q.arg(threadCounter).arg(name) - : name; + ? u"(%1) %2"_q.arg(threadCounter).arg(wrapped) + : wrapped; const auto middle = !user.isEmpty() ? (u" @ "_q + user) : !added.isEmpty() diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 232d972ab..05b46f74c 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -971,7 +971,7 @@ void Notification::updateNotifyDisplay() { } const auto topicWithChat = [&]() -> TextWithEntities { - const auto name = _history->peer->name(); + const auto name = st::wrap_rtl(_history->peer->name()); return _topic ? _topic->titleWithIcon().append(u" ("_q + name + ')') : TextWithEntities{ name };