2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +00:00

Add confirmation box for suspicious urls.

This commit is contained in:
John Preston
2020-04-23 17:56:50 +04:00
parent 3fa5e004fe
commit cfd733c54c
6 changed files with 18 additions and 5 deletions

View File

@@ -1619,7 +1619,9 @@ const style::RoundCheckbox &Link::checkboxStyle() const {
Link::LinkEntry::LinkEntry(const QString &url, const QString &text)
: text(text)
, width(st::normalFont->width(text))
, lnk(std::make_shared<UrlClickHandler>(url)) {
, lnk(UrlClickHandler::IsSuspicious(url)
? std::make_shared<HiddenUrlClickHandler>(url)
: std::make_shared<UrlClickHandler>(url)) {
}
} // namespace Layout