mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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(
|
const auto fromUserText = tr::lng_dlg_search_from(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
textcmdLink(1, from));
|
Ui::Text::Link(from),
|
||||||
_searchFromUserText.setText(
|
Ui::Text::WithEntities);
|
||||||
|
_searchFromUserText.setMarkedText(
|
||||||
st::dialogsSearchFromStyle,
|
st::dialogsSearchFromStyle,
|
||||||
fromUserText,
|
fromUserText,
|
||||||
Ui::DialogTextOptions());
|
Ui::DialogTextOptions());
|
||||||
|
|
|
@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "storage/localstorage.h"
|
#include "storage/localstorage.h"
|
||||||
#include "ui/empty_userpic.h"
|
#include "ui/empty_userpic.h"
|
||||||
#include "ui/text/text_options.h"
|
#include "ui/text/text_options.h"
|
||||||
|
#include "ui/text/text_utilities.h"
|
||||||
#include "ui/unread_badge.h"
|
#include "ui/unread_badge.h"
|
||||||
#include "ui/ui_utility.h"
|
#include "ui/ui_utility.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
@ -367,11 +368,25 @@ void paintRow(
|
||||||
if (!ShowSendActionInDialogs(history)
|
if (!ShowSendActionInDialogs(history)
|
||||||
|| !history->sendActionPainter()->paint(p, nameleft, texttop, availableWidth, fullWidth, color, ms)) {
|
|| !history->sendActionPainter()->paint(p, nameleft, texttop, availableWidth, fullWidth, color, ms)) {
|
||||||
if (history->cloudDraftTextCache.isEmpty()) {
|
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
|
auto draftText = supportMode
|
||||||
? textcmdLink(1, Support::ChatOccupiedString(history))
|
? Ui::Text::PlainLink(
|
||||||
: tr::lng_dialogs_text_with_from(tr::now, lt_from_part, draftWrapped, lt_message, TextUtilities::Clean(draft->textWithTags.text));
|
Support::ChatOccupiedString(history))
|
||||||
history->cloudDraftTextCache.setText(st::dialogsTextStyle, draftText, DialogTextOptions());
|
: 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));
|
p.setPen(active ? st::dialogsTextFgActive : (selected ? st::dialogsTextFgOver : st::dialogsTextFg));
|
||||||
if (supportMode) {
|
if (supportMode) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ TextParseOptions TextNameOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
TextParseOptions TextDialogOptions = {
|
TextParseOptions TextDialogOptions = {
|
||||||
TextParseRichText, // flags
|
TextParsePlainLinks, // flags
|
||||||
0, // maxw is style-dependent
|
0, // maxw is style-dependent
|
||||||
1, // maxh
|
1, // maxh
|
||||||
Qt::LayoutDirectionAuto, // lang-dependent
|
Qt::LayoutDirectionAuto, // lang-dependent
|
||||||
|
|
Loading…
Add table
Reference in a new issue