mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
made links open in incognito by default for hemirt
This commit is contained in:
parent
db4034d2d9
commit
2840b38e91
1 changed files with 10 additions and 2 deletions
|
@ -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); });
|
||||||
|
|
Loading…
Reference in a new issue