Files
simplex-chat/apps/ios/product/views/settings.md
T
Narasimha-sc bf905eb545 ui: settings navigation reorganization (#7005)
* android, desktop: settings navigation reorganization

Restructure the root Settings screen into two top-level sections and
fold previously-scattered items into three new sub-screens.

Root:
- Appearance, Your privacy, Chat data
- Help & support, Migrate to another device, Advanced settings

Your privacy (renamed from Privacy & security): keeps Device,
link previews / remove tracking, auto-accept images, blur media,
contact requests from groups. Adds a "More privacy" sub-screen.

More privacy (new): show last messages, message draft, encrypt local
files, protect IP address (with original dynamic footer preserved),
notification preview mode (moved from Notifications), and delivery
receipts.

Help & support (new): merges Help and Support SimpleX Chat sections
into Help / About (with App version) / Contact / Support the project.

Advanced settings (new): Network & servers, Notifications (Android),
Audio & video calls; then Developer tools, Restart and Shutdown
(Android), App update channel (desktop). Notifications is hidden on
desktop because the screen is empty after Show preview moves to
More privacy.

Chat data is the new top-level menu label for the existing
Database passphrase & export screen.

* android, desktop: trim settings reorg diff

- Remove 5 dead strings from base/strings.xml (privacy_and_security,
  database_passphrase_and_export, settings_section_title_chat_database,
  settings_section_title_support, settings_section_title_app) — no
  Kotlin references after the reorg.
- Drop the now single-variant CurrentPage enum in
  NotificationsSettingsView; replace with a direct callback.
- Read userDisplayName locally in HelpAndSupportView instead of
  threading it through SettingsLayout/SettingsView/Preview.

* android, desktop: remove orphan locale strings

Companion to 442a368c9 which removed 5 dead keys from base/strings.xml.
The :common:adjustFormatting task enforces that every locale string has
a corresponding base entry, so these orphans broke the build. Removed
across 35 locale files (154 lines).

Keys removed:
- privacy_and_security
- database_passphrase_and_export
- settings_section_title_chat_database
- settings_section_title_support
- settings_section_title_app

* Revert "android, desktop: remove orphan locale strings"

This reverts commit 0ad5fc9308a3599d15bf50ca1980002ae0e467b2.

* android, desktop: restore base strings for removed keys

Counterpart to revert of 0ad5fc930: re-add the 5 base entries that
442a368c9 had deleted so the locale files (restored by the prior revert)
are no longer orphaned. Translation keys must not be removed once
introduced — the values can change but the keys stay.

Keys restored to base with their master English values:
- database_passphrase_and_export
- privacy_and_security
- settings_section_title_chat_database
- settings_section_title_support
- settings_section_title_app

* android, desktop: keep share-button helpers in SettingsView

ContributeItem, RateAppItem, StarOnGithubItem were moved from
SettingsView.kt to HelpAndSupportView.kt as part of the reorg.
Move them back: just drop the `private` modifier (one-word edit
per function) so HelpAndSupportView can call them in place. Saves
~60 lines of diff churn vs the move + matches the file's existing
pattern where helpers like AppVersionItem, ChatPreferencesItem,
ChatLockItem, etc. are all public top-level @Composable.

* android, desktop: inline HelpAndSupportView into SettingsView.kt

HelpAndSupportView is the only call site of SettingsView.kt's
share-button helpers; placing it as a top-level @Composable in
SettingsView.kt keeps the help/about/contact/support flow next to
the other settings entry points and removes the need for a new file.
Three imports (BuildConfigCommon, SimpleXInfo, WhatsNewView) that
the reorg was deleting from SettingsView.kt stay in place. Saves
~35 lines of diff and one new file.

* android, desktop: inline AdvancedSettingsView into SettingsView.kt

Same treatment as HelpAndSupportView in the previous commit:
AdvancedSettingsView is only reached from SettingsLayout, so the
function and its expect declaration live as top-level @Composable
in SettingsView.kt instead of a new file. NetworkAndServersView
import that the reorg was deleting from SettingsView.kt stays.
The .android.kt / .desktop.kt actuals are unchanged and keep
implementing the (now relocated) expect. Saves ~15 lines and a file.

* ios: settings navigation reorganization

Mirror the multiplatform reorg on iOS:

Root SettingsView: collapse the 5 sections into 2 unlabeled groups —
{Appearance, Your privacy, Chat data} and {Help & support, Migrate to
another device, Advanced settings}. "Privacy & security" becomes
"Your privacy"; the database row label becomes "Chat data".

PrivacySettings: keeps Device, link previews / remove tracking,
auto-accept images, blur media, contact requests from groups. Adds a
"More privacy" link.

MorePrivacy (new, inlined in PrivacySettings.swift): show last
messages, message draft, encrypt local files, protect IP address
(with original dynamic footer preserved), notification preview mode
(moved from NotificationsView), delivery receipts. Own state and
private helpers for the moved set* functions.

HelpAndSupportView (new, inlined in SettingsView.swift): merges Help
and Support sections into Help / About (with App version) / Contact /
Support the project.

AdvancedSettingsView (new, inlined in SettingsView.swift): Network &
servers, Notifications, Audio & video calls, Developer tools. iOS has
no Restart/Shutdown (Android-only) or App update channel (desktop).

NotificationsView: "Show preview" navigation removed — it now lives
in MorePrivacy. notificationsIcon() promoted to a free function so
AdvancedSettingsView can render the notifications status badge.

* android, desktop: keep platform file names as SettingsView.{android,desktop}.kt

Revert the file renames from {Advanced}SettingsView.{android,desktop}.kt.
Function rename SettingsSectionApp → AdvancedSettingsAppSection stays
inside each file; only the file path returns to its original name. No
behavior change; diff stat now shows two in-place modifications instead
of renames.

* ios: keep PrivacySettings/SettingsView state in place, use inline destinations

Restructure the iOS reorg to avoid moving state, helpers, and the alert
enum out of PrivacySettings — and to avoid moving notificationsIcon
out of SettingsView. The Help & Support, Advanced Settings, and
More Privacy "screens" become private computed properties on their
parent struct, so all @AppStorage, @State, set* helpers, and the
PrivacySettingsViewAlert enum stay UNCHANGED from master. NavigationLink
destinations reference the computed properties directly.

Net iOS diff vs master: 220+/154- (was 361+/259-) — saves ~245 lines.

* simplex settings

* android, desktop: mirror iOS settings reorganization

- inline Advanced settings section into the main settings list (Network &
  servers, Notifications, Audio & video calls, App version); remove the
  separate Advanced settings page
- reorder first section: Appearance, Your privacy, Help & support, Chat data,
  Migrate; merge About SimpleX Chat into the Help section
- move the developer/maintenance section under App version (VersionInfoView);
  load core version inside the view so it always opens (Developer tools and
  Shutdown stay reachable even if the version request fails)
- keep "Developer tools" label (not renamed to "Developer")
- replace the Restart row with Cancel/Restart/Shutdown options in the
  Shutdown dialog
- split DatabaseView: "Chat data" page (messages TTL, Database passphrase &
  export, Files & media) and a sub-page with passphrase/export/import/delete
  and the Run chat toggle; rename title to "Chat data"
- align delivery receipts alert wording with the renamed "Your privacy" settings

* android, desktop: simplify settings reorg internals

- VersionInfoView: drop the section/card wrapping, keep the original plain
  version-text layout; load core version in-view so the screen always opens
- DatabaseView: make the "Database passphrase & export" sub-page a
  self-contained DatabaseManagementView that owns its own state, mirroring the
  DatabaseView/DatabaseLayout pattern instead of threading params through a modal

* android, desktop: show App version screen as a card screen

VersionInfoView now hosts a settings section (Developer tools / updates), so
open it with cardScreen = true like the other settings screens — otherwise the
section renders without the card box around it.

* android, desktop: show "Rate the app" only on mobile

The action opens a Play Store link, which does nothing on desktop (the
market:// scheme has no handler and the web fallback never fires). Gate it to
Android, like the Contribute item.

* android, desktop: move Shutdown to settings above app version

Move the Shutdown action out of the app version screen into the main
advanced settings section, just above the app version row. It stays
Android only (desktop is closed via the window) through an
AppShutdownItem expect/actual.

* android, desktop: show app version info in its own card

Wrap the version info block on the app version screen in a section card,
matching iOS and the rest of the card-screen settings.

* fix background

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2026-06-07 23:38:05 +01:00

10 KiB

Settings

Related spec: spec/client/navigation.md | spec/services/theme.md | spec/services/notifications.md

Purpose

Configure all aspects of app behavior including notifications, network/servers, privacy, appearance, database management, call settings, and Developer. Accessed from the UserPicker sheet on the chat list.

Route / Navigation

  • Entry point: Tap user avatar in ChatListView toolbar -> UserPicker -> Settings option
  • Presented by: UserPickerSheetView(sheet: .settings) wrapping SettingsView in a NavigationView
  • Navigation title: "Your settings"
  • Sub-navigation: Each settings row is a NavigationLink to a dedicated settings view

Page Sections

Settings Section

Row Icon Destination Description
Notifications bolt (color varies by token status) NotificationsView Push notification mode and preview settings
Network & servers externaldrive.connected.to.line.below NetworkAndServers SMP/XFTP servers, proxy, .onion hosts, advanced network
Audio & video calls video CallSettings WebRTC relay policy, ICE servers, CallKit options
Your privacy lock PrivacySettings SimpleX Lock, screen protection, delivery receipts, auto-accept
Appearance sun.max AppearanceSettings Theme, language, wallpapers, chat bubbles, toolbar opacity

All rows disabled when chatModel.chatRunning != true. Appearance row only shown when UIApplication.shared.supportsAlternateIcons.

Notifications (NotificationsView)

Setting Options
Notification mode Instant (background connection) / Periodic (every 10 min) / Off
Notification preview Hidden / Contact name only / Message preview
Token status indicator Icon color reflects: new, registered, confirmed (yellow), active (green), expired, invalid

Network & Servers (NetworkAndServers)

Setting Description
SMP servers Messaging relay servers; per-operator configuration
XFTP servers File transfer servers; per-operator configuration
Server operators OperatorView for each configured operator
Advanced network AdvancedNetworkSettings -- timeouts, TCP keep-alive, reconnect intervals
Proxy configuration SOCKS proxy, .onion host settings
Show sent via proxy Toggle to show proxy indicator on sent messages
Show subscription % Toggle to show server subscription percentage

Sub-files: NetworkAndServers.swift, ProtocolServersView.swift, ProtocolServerView.swift, NewServerView.swift, ScanProtocolServer.swift, AdvancedNetworkSettings.swift, OperatorView.swift, ConditionsWebView.swift, ChatRelayView.swift

Chat Relays

Chat relays forward messages to channel subscribers. They appear in two locations:

  • Operator View (OperatorView): "Chat relays" section lists relays for each operator with ChatRelayViewLink rows. Footer: "Chat relays forward messages in channels you create."
  • Your Servers (YourServersView in ProtocolServersView): "Chat relays" section for non-operator relays. "Add server" dialog includes a "Chat relay" option.

Each relay is managed via ChatRelayView:

Element Preset relay Custom relay
Name Read-only display Editable text field
Address Read-only display Editable text field (validates as .simplexLink(_, .relay, _, _))
Test button "Test relay" (shows "Not implemented" alert) Same
Enable toggle "Use for new channels" Same
Delete Not available "Delete relay" button

Adding a relay: NewChatRelayView form with name, address, test, and enable toggle. Back-button validates name/address and shows alerts for invalid input.

Server Warnings

ServersWarningView displays an orange exclamation triangle with warning text when UserServersWarning.noChatRelays is detected. Appears in:

  • Network & Servers footer (globalServersWarning)
  • Operator view footer
  • Your servers footer

Server validation (validateServers_) now returns both errors and warnings.

Your privacy (PrivacySettings)

Setting Description
SimpleX Lock Enable biometric (Face ID / Touch ID) or passcode lock
Lock mode System biometric or custom passcode
Lock timeout Delay before lock activates (0s to 30min)
Self-destruct Optional self-destruct passcode that wipes all data
Screen protection Hide app content in app switcher
Encrypt local files Encrypt media and files stored on device
Auto-accept images Automatically download received images
Link previews Generate link previews for sent URLs
SimpleX link mode Description / Full link / Via browser
Chat previews Show message previews in chat list
Save last draft Remember unsent message drafts
Delivery receipts Enable/disable read receipts globally
Media blur radius Blur level for received media before tapping

Appearance (AppearanceSettings)

Setting Description
App icon Alternative app icon selection
Language Interface language
Theme System / Light / Dark
Dark theme variant Dark / SimpleX / Black
Active theme colors Accent color, chat bubble colors, text colors
Wallpapers Chat background wallpaper selection and customization
Profile image corner radius Adjust avatar roundness
Chat bubble roundness Adjust message bubble corner radius
Chat bubble tail Toggle message bubble tail/pointer
Toolbar opacity ToolbarMaterial transparency setting
One-hand UI Bottom toolbar layout for reachability

Audio & Video Calls (CallSettings)

Setting Description
WebRTC relay policy Always relay / Allow direct
ICE servers Custom STUN/TURN server configuration
CallKit integration Enable/disable native iOS call UI
Calls in recents Show/hide calls in Phone app history
Lock screen calls Show/accept on lock screen options

Chat Database Section

Row Icon Destination Description
Database passphrase & export internaldrive (orange if unencrypted) DatabaseView Passphrase management, export/import database, file storage stats
Migrate to another device tray.and.arrow.up MigrateFromDevice Export database and generate migration link

Database row shows exclamation octagon icon in red when chatRunning == false.

Help Section

Row Icon Destination Description
How to use it questionmark ChatHelp Usage guide with user's display name
What's new plus WhatsNewView Changelog and new features
About SimpleX Chat info SimpleXInfo About page with privacy explanation
Send questions and ideas number Opens SimpleX team chat link Direct contact with developers
Send us email envelope mailto:chat@simplex.chat Email link

Support SimpleX Chat Section

Row Icon Action
Contribute keyboard Opens GitHub contribution guide
Rate the app star SKStoreReviewController.requestReview
Star on GitHub GitHub icon Opens GitHub repository

Develop Section

Row Icon Destination Description
Developer chevron.left.forwardslash.chevron.right DeveloperView Chat console/terminal, log level, confirm DB upgrades
App version (none) VersionView Shows "v{version} ({build})"

Loading / Error States

State Behavior
Chat not running Most navigation links disabled; database row shows warning
Database not encrypted Database icon shown in orange
Migration in progress showProgress overlays ProgressView on entire settings view
Terminal cleanup On disappear: chatModel.showingTerminal = false, terminal items cleared

App Defaults

Key UserDefaults / AppStorage keys managed by settings:

  • DEFAULT_PERFORM_LA, DEFAULT_LA_MODE, DEFAULT_LA_LOCK_DELAY, DEFAULT_LA_SELF_DESTRUCT
  • DEFAULT_PRIVACY_ACCEPT_IMAGES, DEFAULT_PRIVACY_LINK_PREVIEWS, DEFAULT_PRIVACY_PROTECT_SCREEN
  • DEFAULT_PRIVACY_SHOW_CHAT_PREVIEWS, DEFAULT_PRIVACY_SAVE_LAST_DRAFT
  • DEFAULT_PRIVACY_DELIVERY_RECEIPTS_SET, DEFAULT_PRIVACY_MEDIA_BLUR_RADIUS
  • DEFAULT_WEBRTC_POLICY_RELAY, DEFAULT_WEBRTC_ICE_SERVERS, DEFAULT_CALL_KIT_CALLS_IN_RECENTS
  • DEFAULT_CURRENT_THEME, DEFAULT_SYSTEM_DARK_THEME, DEFAULT_THEME_OVERRIDES
  • DEFAULT_PROFILE_IMAGE_CORNER_RADIUS, DEFAULT_CHAT_ITEM_ROUNDNESS, DEFAULT_CHAT_ITEM_TAIL
  • DEFAULT_TOOLBAR_MATERIAL, DEFAULT_ONE_HAND_UI_CARD_SHOWN
  • DEFAULT_DEVELOPER_TOOLS, DEFAULT_SHOW_SENT_VIA_RPOXY, DEFAULT_SHOW_SUBSCRIPTION_PERCENTAGE
  • spec/architecture.md -- App architecture overview
  • spec/services/theme.md -- Theme system specification
  • Chat List -- Parent view via UserPicker
  • User Profiles -- Profile management (separate UserPicker option)

Source Files

  • Shared/Views/UserSettings/SettingsView.swift -- Main settings view, section layout, app defaults definitions
  • Shared/Views/UserSettings/NotificationsView.swift -- Notification mode and preview settings
  • Shared/Views/UserSettings/AppearanceSettings.swift -- Theme, wallpaper, UI customization
  • Shared/Views/UserSettings/PrivacySettings.swift -- Privacy and security settings
  • Shared/Views/UserSettings/NetworkAndServers/NetworkAndServers.swift -- Server and network configuration
  • Shared/Views/UserSettings/NetworkAndServers/AdvancedNetworkSettings.swift -- TCP/timeout settings
  • Shared/Views/UserSettings/NetworkAndServers/ProtocolServersView.swift -- SMP/XFTP server list
  • Shared/Views/UserSettings/NetworkAndServers/ProtocolServerView.swift -- Individual server edit
  • Shared/Views/UserSettings/NetworkAndServers/NewServerView.swift -- Add new server
  • Shared/Views/UserSettings/NetworkAndServers/ScanProtocolServer.swift -- Scan server QR code
  • Shared/Views/UserSettings/NetworkAndServers/OperatorView.swift -- Server operator configuration
  • Shared/Views/UserSettings/NetworkAndServers/ChatRelayView.swift -- Chat relay detail/edit/add views
  • Shared/Views/UserSettings/NetworkAndServers/ConditionsWebView.swift -- Operator conditions display