mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-29 21:48:26 +00:00
Removed text commands from poll box.
This commit is contained in:
parent
d9147562e5
commit
1fa825321d
@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
#include "ui/toast/toast.h"
|
#include "ui/toast/toast.h"
|
||||||
|
#include "ui/text/text_utilities.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/core_settings.h"
|
#include "core/core_settings.h"
|
||||||
@ -190,9 +191,12 @@ not_null<Ui::FlatLabel*> CreateWarningLabel(
|
|||||||
const auto value = valueLimit - length;
|
const auto value = valueLimit - length;
|
||||||
const auto shown = (value < warnLimit)
|
const auto shown = (value < warnLimit)
|
||||||
&& (field->height() > st::createPollOptionField.heightMin);
|
&& (field->height() > st::createPollOptionField.heightMin);
|
||||||
result->setRichText((value >= 0)
|
if (value >= 0) {
|
||||||
? QString::number(value)
|
result->setText(QString::number(value));
|
||||||
: textcmdLink(1, QString::number(value)));
|
} else {
|
||||||
|
result->setMarkedText(Ui::Text::PlainLink(
|
||||||
|
QString::number(value)));
|
||||||
|
}
|
||||||
result->setVisible(shown);
|
result->setVisible(shown);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user