Support reading me_url_prefix from config.

The default value 'https://t.me' can be overriden from server config.
This commit is contained in:
John Preston
2017-03-10 20:25:43 +03:00
parent 70b6335b11
commit 5bb68cfd8f
16 changed files with 74 additions and 30 deletions
@@ -26,6 +26,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "window/themes/window_theme.h"
#include "lang.h"
#include "numbers.h"
#include "messenger.h"
namespace Ui {
namespace {
@@ -3828,8 +3829,8 @@ void PortInput::correctValue(const QString &was, int32 wasCursor, QString &now,
setCorrectedText(now, nowCursor, newText, newPos);
}
UsernameInput::UsernameInput(QWidget *parent, const style::InputField &st, const QString &ph, const QString &val, bool isLink) : MaskedInputField(parent, st, ph, val),
_linkPlaceholder(isLink ? CreateInternalLink(QString()) : QString()) {
UsernameInput::UsernameInput(QWidget *parent, const style::InputField &st, const QString &ph, const QString &val, bool isLink) : MaskedInputField(parent, st, ph, val)
, _linkPlaceholder(isLink ? Messenger::Instance().createInternalLink(QString()) : QString()) {
if (!_linkPlaceholder.isEmpty()) {
setTextMargins(style::margins(_st.textMargins.left() + _st.font->width(_linkPlaceholder), _st.textMargins.top(), _st.textMargins.right(), _st.textMargins.bottom()));
setPlaceholderHidden(true);