mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-27 07:24:47 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user