added setting to open links in incognito by default
This commit is contained in:
@@ -1528,14 +1528,8 @@ void ChannelView::addContextMenuItems(
|
||||
QString url = hoveredElement->getLink().value;
|
||||
|
||||
// open link
|
||||
bool incognitoByDefault = supportsIncognitoLinks() &&
|
||||
layout->getMessage()->loginName == "hemirt";
|
||||
menu->addAction("Open link", [url, incognitoByDefault] {
|
||||
if (incognitoByDefault)
|
||||
openLinkIncognito(url);
|
||||
else
|
||||
QDesktopServices::openUrl(QUrl(url));
|
||||
});
|
||||
menu->addAction("Open link",
|
||||
[url] { QDesktopServices::openUrl(QUrl(url)); });
|
||||
// open link default
|
||||
if (supportsIncognitoLinks())
|
||||
{
|
||||
@@ -1701,7 +1695,10 @@ void ChannelView::handleLinkClick(QMouseEvent *event, const Link &link,
|
||||
|
||||
case Link::Url:
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(link.value));
|
||||
if (getSettings()->openLinksIncognito && supportsIncognitoLinks())
|
||||
openLinkIncognito(link.value);
|
||||
else
|
||||
QDesktopServices::openUrl(QUrl(link.value));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user