made links open in incognito by default for hemirt
This commit is contained in:
@@ -1221,8 +1221,16 @@ void ChannelView::addContextMenuItems(
|
|||||||
if (hoveredElement->getLink().type == Link::Url) {
|
if (hoveredElement->getLink().type == Link::Url) {
|
||||||
QString url = hoveredElement->getLink().value;
|
QString url = hoveredElement->getLink().value;
|
||||||
|
|
||||||
menu->addAction("Open link",
|
// open link
|
||||||
[url] { QDesktopServices::openUrl(QUrl(url)); });
|
bool incognitoByDefault = supportsIncognitoLinks() &&
|
||||||
|
layout->getMessage()->loginName == "hemirt";
|
||||||
|
menu->addAction("Open link", [url, incognitoByDefault] {
|
||||||
|
if (incognitoByDefault)
|
||||||
|
openLinkIncognito(url);
|
||||||
|
else
|
||||||
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
|
});
|
||||||
|
// open link default
|
||||||
if (supportsIncognitoLinks()) {
|
if (supportsIncognitoLinks()) {
|
||||||
menu->addAction("Open link incognito",
|
menu->addAction("Open link incognito",
|
||||||
[url] { openLinkIncognito(url); });
|
[url] { openLinkIncognito(url); });
|
||||||
|
|||||||
Reference in New Issue
Block a user