mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show confirmation on hidden webpage url.
This commit is contained in:
parent
2d1fdc4485
commit
617d21129f
1 changed files with 13 additions and 1 deletions
|
@ -3472,7 +3472,19 @@ QSize HistoryWebPage::countOptimalSize() {
|
||||||
auto lineHeight = unitedLineHeight();
|
auto lineHeight = unitedLineHeight();
|
||||||
|
|
||||||
if (!_openl && !_data->url.isEmpty()) {
|
if (!_openl && !_data->url.isEmpty()) {
|
||||||
_openl = std::make_shared<UrlClickHandler>(_data->url, true);
|
const auto previewOfHiddenUrl = [&] {
|
||||||
|
const auto full = _parent->data()->originalText();
|
||||||
|
for (const auto &entity : full.entities) {
|
||||||
|
if (entity.type() == EntityInTextCustomUrl
|
||||||
|
&& entity.data() == _data->url) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}();
|
||||||
|
_openl = previewOfHiddenUrl
|
||||||
|
? std::make_shared<HiddenUrlClickHandler>(_data->url)
|
||||||
|
: std::make_shared<UrlClickHandler>(_data->url, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// init layout
|
// init layout
|
||||||
|
|
Loading…
Add table
Reference in a new issue