From 2f89e6fedaa54e26dea4ca4da1dddb3695e0607f Mon Sep 17 00:00:00 2001 From: iSecNew10 Date: Thu, 6 Apr 2023 08:38:59 +0200 Subject: [PATCH] Add ref code for appdb links in news --- appdb/Tabs/Settings/News/News+Detail.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appdb/Tabs/Settings/News/News+Detail.swift b/appdb/Tabs/Settings/News/News+Detail.swift index 697588e7..6a202ee9 100644 --- a/appdb/Tabs/Settings/News/News+Detail.swift +++ b/appdb/Tabs/Settings/News/News+Detail.swift @@ -205,7 +205,7 @@ extension AttributedLabel { case .tag(let tag): if tag.name == "a", var href = tag.attributes["href"] { if href.hasPrefix("http") { - guard let url = URL(string: href.replacingOccurrences(of: "&", with: "&")) else { return } + guard let url = URL(string: href.replacingOccurrences(of: "&", with: "&") + "&ref=" + Global.refCode) else { return } UIApplication.shared.open(url) } else { while href.hasPrefix("/") { href = String(href.dropFirst()) }