Commit Graph

21904 Commits

Author SHA1 Message Date
John Preston 27e1867346 Delete old faq entries. 2026-01-28 11:55:22 +04:00
John Preston ecae9c7794 Add separate lang key for FAQ search result subtitles.
Use shorter 'FAQ' prefix for search results instead of full
'Telegram FAQ' that's used for the main FAQ button label.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 594dc126e7 Index FAQ entries together with settings entries.
Now FAQ entries appear in filtered search results when the query
matches, not just when query is empty. Uses same button cache and
first-letter index for both settings and FAQ entries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston fafe2f96c1 Restore settings search query on return. 2026-01-28 11:55:21 +04:00
John Preston 4c2e73a3ae Show FAQ entries as default search results. 2026-01-28 11:55:21 +04:00
John Preston eff86fc84d Cache and reuse search result buttons in settings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 55624b3410 Fix Ctrl+F in settings. 2026-01-28 11:55:21 +04:00
John Preston e022c6e0f9 Optimize settings search with first-letter index.
Build search index once when the section is created instead
of recomputing on every query. Use first-letter lookup for
O(1) candidate filtering, following the pattern from theme
editor's searchByQuery implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 16442e2013 Preserve search query on navigation in settings.
Use the stepDataReference mechanism to save and restore the
search query when navigating from results to a section and back.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 38832396bc Implement smart sorting for settings search results.
Sort results by match count (descending), then by parent chain
depth (ascending), and finally alphabetically by title.
2026-01-28 11:55:21 +04:00
John Preston b60f6b0705 Implement word-based matching in settings search.
Use TextUtilities::PrepareSearchWords() to normalize query and
entry text: split into words, remove accents, and lowercase.
Match by word prefix: each query word must match at least one
entry word by startsWith().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston f822d23509 Support Ctrl+F shortcut in settings to open search. 2026-01-28 11:55:21 +04:00
John Preston 55d43e7cad Fix search highlighting across settings sections. 2026-01-28 11:55:21 +04:00
John Preston af28ef7c94 Don't index section buttons in settings search. 2026-01-28 11:55:21 +04:00
John Preston 81b095e73d Improve subtitles for settings section entries. 2026-01-28 11:55:21 +04:00
John Preston 49253a9586 Fix deeplink settings search entries. 2026-01-28 11:55:21 +04:00
John Preston 374b877323 Add Profile Photo search entry.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 2b5732f586 Add deeplink support for search entries.
SearchEntry now has an optional `deeplink` field. When set, clicking
the search result activates the deeplink URL instead of navigating.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 38d8aa2a33 Fix interface scale highlighting.
The custom build method in Main::setupContent() was missing the
HighlightRegistry setup, so widgets added via builder.add() with
search entries weren't being registered for highlighting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston ead60ebfcd Fix Chat::Id() → ChatId() in settings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston d2933428a4 Fix search result subtitles.
sectionPath() was starting with parentId instead of the section itself,
causing subtitles to skip the section name the entry belongs to.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston ec683d7488 Add place for current working AI docs. 2026-01-28 11:55:21 +04:00
John Preston 0d88925f83 Remove SectionBuildMethod exports from headers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston f5319724e3 Move Settings::PrivacySecurity class to anonymous namespace
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston d37216815d Move Settings::Notifications class to anonymous namespace
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 4982814d36 Move Settings::Chat class to anonymous namespace
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston e84e8a7cf6 Move Settings::Advanced class to anonymous namespace
- Move Advanced class definition into .cpp file anonymous namespace
- Export only Type AdvancedId() in header
- Keep exported helper functions (SetupConnectionType, HasUpdate, etc.)
- Remove unused SetupWindowCloseBehaviorContent declaration
- Update callers to use AdvancedId() instead of Advanced::Id()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 480dcd8a7a Move Settings::Main class to anonymous namespace
- Move Main class definition from header to .cpp file
- Export only Type MainId() from header
- Update all external references from Main::Id() to MainId()
- Remove Builder::MainSection export from namespace
- Add missing includes for settings_common_session.h where needed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 6bda4dd0d8 Upgrade settings_local_passcode to full builder pattern
- Move LocalPasscodeManage class into anonymous namespace
- Remove Builder::LocalPasscodeManageSection export from header
- Use inline buildMethod for setupContent()
- Keep Create/Check/Change enter-type sections as-is (form-based)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 18114458b8 Upgrade settings_calls to full builder pattern
- Move Calls class to anonymous namespace in .cpp
- Export only Type CallsId() from header
- Move AddCameraSubsection to be a free function (exported)
- Keep all device helper functions exported
- Update all references to use CallsId() and AddCameraSubsection()
- Add missing include to calls_group_settings.cpp

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:21 +04:00
John Preston 7e5b85c4b3 Upgrade settings_information to full builder pattern
- Move Information class to anonymous namespace in .cpp
- Export only Type InformationId() from header
- Keep exported helpers: SetupAccounts, UpdatePhotoLocally, Badge::*
- Use custom buildMethod with HighlightRegistry for all profile widgets
- Update all references to use InformationId() instead of Information::Id()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 4199bba706 Upgrade settings_shortcuts to full builder pattern
- Move Shortcuts class to anonymous namespace in .cpp
- Export only Type ShortcutsId() from header
- Use custom buildMethod with HighlightRegistry for reset button
- Update settings_chat.cpp to use ShortcutsId() instead of Shortcuts::Id()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston d7fa4048c1 Upgrade settings_websites to full builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 20408aa531 Upgrade settings_premium to full builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 518993cb4c Upgrade settings_notifications_type to full builder pattern
- Move widget creation into BuildNotificationsTypeContent() builder function
- Use builder.add() with widget and search callbacks for indexed controls
- Update setupContent() to use build() with custom buildMethod that captures _type
- Remove manual highlight tracking (QPointer fields and showFinished() registrations)
- Class remains in header due to parameterized constructor (takes Notify type)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 8a017226c3 Upgrade settings_passkeys to full builder pattern
- Move create passkey button to builder.addButton() with proper ID
- Use builder.add() for dynamic passkeys list
- Move Passkeys class from header to .cpp (anonymous namespace)
- Remove extern SectionBuildMethod from header
- Have setupContent() call build() with custom build method
- Simplify header to only export Type PasskeysId() and PasskeysNoneBox()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 31f3d6810d Upgrade settings_credits to full builder pattern
- Move stats/gift/earn buttons to builder.addButton() with proper IDs
- Use builder.add() for dynamic subscriptions/history lists
- Have setupContent() call build(content, buildMethod)
- Remove extern SectionBuildMethod from header
- Extract BuildCurrencyWithdrawalSection helper function
- Add forward declarations for builder functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston ac5b9a3e78 Upgrade settings_business to full builder pattern
- Add BusinessState struct for shared state between setupContent and builder
- Update setupContent() to call build() with custom method
- Remove duplicate widget creation code
- Use state->setPaused and state->sponsoredButton instead of class members
- Remove extern SectionBuildMethod from header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston cde0a11c74 Upgrade settings_global_ttl to full builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston b0ddca72ae Upgrade settings_blocked_peers to full builder pattern
Move Blocked class to anonymous namespace in .cpp, export only
Type BlockedPeersId() in header. Remove extern SectionBuildMethod
from header. Update references in privacy_security and deep_links.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 7dbeb56111 Upgrade settings_active_sessions to full builder pattern
- Move Sessions class to anonymous namespace in .cpp file
- Export only Type SessionsId() in header
- Use builder pattern with custom buildMethod for widget creation
- Handle highlights registration through WidgetContext
- Rename local Type enum to DeviceType to avoid conflict with Settings::Type
- Update all references to Sessions::Id() in other files to use SessionsId()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston df347ad0f4 Upgrade settings_folders to full builder pattern
- Move Folders class to anonymous namespace in .cpp
- Export only Type FoldersId() from header
- setupContent() uses custom SectionBuildMethod capturing state
- Widget creation through builder.add() callbacks
- Highlight registration via push_back

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 4c5cf47bc9 Rewrite settings_websites to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 53cb0e79cb Rewrite settings_shortcuts to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 9316cec95d Rewrite settings_premium to new builder pattern
- Move settings_premium.h/cpp from settings/ to settings/sections/
- Add BuildHelper with kMeta for search indexing
- Index premium features and subscribe button for search
- Keep complex Premium section UI (custom top bar, feature list) as non-indexed
- Update all include paths across the codebase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 86398de8bd Rewrite settings_passkeys to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston d966dc2343 Rewrite settings_notifications_type to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston fd4c42a156 Rewrite settings_information to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 5b14d62ede Rewrite settings_folders to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00
John Preston 1fa68effdd Rewrite settings_credits to new builder pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:55:20 +04:00