Skip to content

Chats search + chats folder refactor#273

Merged
gdlbo merged 8 commits intodevelopfrom
chats-search
Apr 25, 2026
Merged

Chats search + chats folder refactor#273
gdlbo merged 8 commits intodevelopfrom
chats-search

Conversation

@gdlbo
Copy link
Copy Markdown
Member

@gdlbo gdlbo commented Apr 24, 2026

No description provided.

gdlbo added 8 commits April 24, 2026 15:55
…gation

- implement `SearchMessages.kt` to handle message search logic, including debounced queries, pagination, and multi-criteria filtering (sender, date range)
- add advanced search UI components including `SearchNavigationPanel`, `SearchFilterTray`, `SearchSenderPickerOverlay`, and `SearchResultsListOverlay`
- support filtering search results by specific sender and date ranges (Today, Last 7 days, Last 30 days, or custom picker)
- update `MessageRepository` and `MessageRemoteDataSource` to support `senderId` and `threadId` in search requests
- enhance `ChatTopBar` with a search toggle and integrate new search intents into `ChatStore` and `DefaultChatComponent`
- add localized string resources for search states, date labels, and result formatting in English and Russian
- ensure search state is reset when switching chat topics or message threads
- implement automatic "load more" logic for search results during scrolling and navigation
- refine `TdMessageRemoteDataSource` to correctly resolve topic IDs for forum and thread-based searches within the TDLib fork context
…anagers

- extract chat-specific side effects, scroll coordination, and UI state derivation into standalone internal files (`ChatContentEffects.kt`, `ChatContentScrollCoordinator.kt`, `ChatContentDerivedState.kt`)
- introduce `rememberChatContentPermissionState`, `rememberChatMessageListState`, and `rememberChatTopBarUiState` to encapsulate complex UI state derivation
- move input bar state and action handling to `ChatContentInputConfiguration.kt`
- externalize search-related UI components into `ChatContentSearchOverlay.kt` and `rememberChatSearchUiState`
- centralize modal sheets and overlay logic (pinned messages, stickers, poll voters, bot commands, and editors) in `ChatContentOverlays.kt`
- isolate message content manipulation utilities in `ChatContentMessageUtils.kt`
- clean up `ChatContent.kt` by replacing inline logic with the new specialized state and effect helpers for improved maintainability and performance
… control

- introduce `MessageRenderDependencies` and `LocalMessageRenderDependencies` to centralize emoji font and custom emoji path resolution across chat components
- implement `VoicePlaybackController` and `ExoPlayerVoicePlaybackController` to manage voice message state globally within a conversation, replacing per-bubble player logic
- refactor JNI function names in `native-lib.cpp` to match the relocation of `NativeVideoRenderer` and `VideoEditorUtils` to the core media package
- enhance `AlphaVideoPlayer` with stricter surface validity checks and improved `ExoPlayer` surface cleanup to prevent crashes and leaks
- optimize `MessageTextFormatter` and `MessageReactionsView` to consume render dependencies via `CompositionLocal` instead of manual repository injections
- update `ChatContentEffects` with more precise `LaunchedEffect` keys to ensure scroll and visibility triggers react correctly to message list changes
- integrate the new rendering and playback controllers into `ChatContent` using `CompositionLocalProvider`
…t and performance

- introduce `MessageAppearanceConfig`, `MessageRowBehaviorConfig`, and `MessageRowUiFlags` to centralize message rendering and interaction logic
- refactor `ChatInputBar` to use structured state objects (`ChatInputBarCapabilities`, `ComposerRowState`, `ComposerBotState`) for cleaner prop drilling
- implement `derivedStateOf` and `rememberUpdatedState` in `InputTextField` to optimize composition and avoid unnecessary rebuilds during text transformation
- decompose `VideoMessageBubble` into specialized sub-components (e.g., `VideoMuteToggle`, `VideoPlaybackBadge`, `VideoInteractionOverlay`) for better maintainability
- extract message bubble layout tracking into `MessageBubbleLayoutTracker` to standardize position reporting for context menus and replies
- modularize `ChatInputBarComposerSection` into `ComposerMainRow`, `ComposerInputSlot`, and `ComposerActionsSlot`
- consolidate sender grouping logic into a unified `buildSenderGrouping` utility
- update `MessageBubbleContainer` and `AlbumMessageBubbleContainer` to utilize the new configuration contracts for UI flags and behavior
- simplify `InputBarSendButton` by passing a single `InputBarSendButtonState` object
- refine `InputTextFieldContainer` logic to use `InputTextFieldUiState` for reactive visibility and action states
- decouple `MediaViewer` into specialized `ImageViewer` and `VideoViewer` components to reduce complexity and improve state management
- introduce `FullscreenViewerHost` and `FullscreenViewerHostState` to centralize common fullscreen UI logic, including system bar visibility, gesture-based dismissal, and PiP handling
- update `VideoViewer` to use `VideoPage` directly within the new host, improving lifecycle management of the `ExoPlayer` instance
- reimplement `ImageViewer` using a `HorizontalPager` and a dedicated `ImageOverlay` for better navigation and caption handling
- refactor `ChatContentOverlays` and `MainContent` to handle media viewers differently based on window size class and tablet interface settings
- optimize `MediaViewer` entry point to bypass pager logic when rendering a single video item
- remove redundant logging and standardize internal visibility for chat overlay components
- ensure consistent reset of zoom and scroll states when navigating between media items in a pager
@gdlbo gdlbo merged commit a02fe54 into develop Apr 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant