core, ui: persist "Remove link tracking" setting on database import (#6977)

* core, ui: persist "Remove link tracking" setting on database import

The privacySanitizeLinks preference was stored locally only and absent from
the AppSettings round-trip, so it was lost when migrating to another device
or after a fresh install + DB import. Add the field to the Haskell, Kotlin,
and Swift AppSettings payloads and wire it through iOS group defaults.

* plans: justify privacySanitizeLinks AppSettings round-trip fix
This commit is contained in:
Narasimha-sc
2026-05-16 09:22:57 +00:00
committed by GitHub
parent 9011c9db28
commit af24d030fa
6 changed files with 166 additions and 0 deletions
+6
View File
@@ -33,6 +33,7 @@ data AppSettings = AppSettings
privacyAskToApproveRelays :: Maybe Bool,
privacyAcceptImages :: Maybe Bool,
privacyLinkPreviews :: Maybe Bool,
privacySanitizeLinks :: Maybe Bool,
privacyShowChatPreviews :: Maybe Bool,
privacySaveLastDraft :: Maybe Bool,
privacyProtectScreen :: Maybe Bool,
@@ -83,6 +84,7 @@ defaultAppSettings =
privacyAskToApproveRelays = Just True,
privacyAcceptImages = Just True,
privacyLinkPreviews = Just True,
privacySanitizeLinks = Just False,
privacyShowChatPreviews = Just True,
privacySaveLastDraft = Just True,
privacyProtectScreen = Just False,
@@ -120,6 +122,7 @@ defaultParseAppSettings =
privacyAskToApproveRelays = Nothing,
privacyAcceptImages = Nothing,
privacyLinkPreviews = Nothing,
privacySanitizeLinks = Nothing,
privacyShowChatPreviews = Nothing,
privacySaveLastDraft = Nothing,
privacyProtectScreen = Nothing,
@@ -157,6 +160,7 @@ combineAppSettings platformDefaults storedSettings =
privacyAskToApproveRelays = p privacyAskToApproveRelays,
privacyAcceptImages = p privacyAcceptImages,
privacyLinkPreviews = p privacyLinkPreviews,
privacySanitizeLinks = p privacySanitizeLinks,
privacyShowChatPreviews = p privacyShowChatPreviews,
privacySaveLastDraft = p privacySaveLastDraft,
privacyProtectScreen = p privacyProtectScreen,
@@ -210,6 +214,7 @@ instance FromJSON AppSettings where
privacyAskToApproveRelays <- p "privacyAskToApproveRelays"
privacyAcceptImages <- p "privacyAcceptImages"
privacyLinkPreviews <- p "privacyLinkPreviews"
privacySanitizeLinks <- p "privacySanitizeLinks"
privacyShowChatPreviews <- p "privacyShowChatPreviews"
privacySaveLastDraft <- p "privacySaveLastDraft"
privacyProtectScreen <- p "privacyProtectScreen"
@@ -244,6 +249,7 @@ instance FromJSON AppSettings where
privacyAskToApproveRelays,
privacyAcceptImages,
privacyLinkPreviews,
privacySanitizeLinks,
privacyShowChatPreviews,
privacySaveLastDraft,
privacyProtectScreen,