mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Removed text commands from dialogs list.
This commit is contained in:
parent
a626364430
commit
e451eb5126
3 changed files with 23 additions and 7 deletions
|
@ -2348,8 +2348,9 @@ void InnerWidget::refreshSearchInChatLabel() {
|
|||
const auto fromUserText = tr::lng_dlg_search_from(
|
||||
tr::now,
|
||||
lt_user,
|
||||
textcmdLink(1, from));
|
||||
_searchFromUserText.setText(
|
||||
Ui::Text::Link(from),
|
||||
Ui::Text::WithEntities);
|
||||
_searchFromUserText.setMarkedText(
|
||||
st::dialogsSearchFromStyle,
|
||||
fromUserText,
|
||||
Ui::DialogTextOptions());
|
||||
|
|
|
@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "storage/localstorage.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "ui/text/text_options.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/unread_badge.h"
|
||||
#include "ui/ui_utility.h"
|
||||
#include "lang/lang_keys.h"
|
||||
|
@ -367,11 +368,25 @@ void paintRow(
|
|||
if (!ShowSendActionInDialogs(history)
|
||||
|| !history->sendActionPainter()->paint(p, nameleft, texttop, availableWidth, fullWidth, color, ms)) {
|
||||
if (history->cloudDraftTextCache.isEmpty()) {
|
||||
auto draftWrapped = textcmdLink(1, tr::lng_dialogs_text_from_wrapped(tr::now, lt_from, tr::lng_from_draft(tr::now)));
|
||||
auto draftWrapped = Ui::Text::PlainLink(
|
||||
tr::lng_dialogs_text_from_wrapped(
|
||||
tr::now,
|
||||
lt_from,
|
||||
tr::lng_from_draft(tr::now)));
|
||||
auto draftText = supportMode
|
||||
? textcmdLink(1, Support::ChatOccupiedString(history))
|
||||
: tr::lng_dialogs_text_with_from(tr::now, lt_from_part, draftWrapped, lt_message, TextUtilities::Clean(draft->textWithTags.text));
|
||||
history->cloudDraftTextCache.setText(st::dialogsTextStyle, draftText, DialogTextOptions());
|
||||
? Ui::Text::PlainLink(
|
||||
Support::ChatOccupiedString(history))
|
||||
: tr::lng_dialogs_text_with_from(
|
||||
tr::now,
|
||||
lt_from_part,
|
||||
draftWrapped,
|
||||
lt_message,
|
||||
{ .text = draft->textWithTags.text },
|
||||
Ui::Text::WithEntities);
|
||||
history->cloudDraftTextCache.setMarkedText(
|
||||
st::dialogsTextStyle,
|
||||
draftText,
|
||||
DialogTextOptions());
|
||||
}
|
||||
p.setPen(active ? st::dialogsTextFgActive : (selected ? st::dialogsTextFgOver : st::dialogsTextFg));
|
||||
if (supportMode) {
|
||||
|
|
|
@ -80,7 +80,7 @@ TextParseOptions TextNameOptions = {
|
|||
};
|
||||
|
||||
TextParseOptions TextDialogOptions = {
|
||||
TextParseRichText, // flags
|
||||
TextParsePlainLinks, // flags
|
||||
0, // maxw is style-dependent
|
||||
1, // maxh
|
||||
Qt::LayoutDirectionAuto, // lang-dependent
|
||||
|
|
Loading…
Add table
Reference in a new issue