mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Extracted URL protocol stripping to Ui::Text::StripUrlProtocol.
This commit is contained in:
@@ -393,11 +393,7 @@ object_ptr<Ui::AbstractButton> MakeLinkLabel(
|
||||
const QString &link,
|
||||
const style::InputField *stOverride) {
|
||||
const auto &st = stOverride ? *stOverride : st::dialogsFilter;
|
||||
const auto text = link.startsWith(u"https://"_q)
|
||||
? link.mid(8)
|
||||
: link.startsWith(u"http://"_q)
|
||||
? link.mid(7)
|
||||
: link;
|
||||
const auto text = Ui::Text::StripUrlProtocol(link);
|
||||
const auto margins = st.textMargins;
|
||||
const auto height = st.heightMin;
|
||||
const auto skip = margins.left();
|
||||
|
||||
+1
-1
Submodule Telegram/lib_ui updated: e79c2cc66d...ca5daff64b
Reference in New Issue
Block a user