refactor: consolidate message loading logic into chat_loader.rs
Move all three phases of chat message loading from scattered locations into a single dedicated module for better cohesion and navigability: - Phase 1: open_chat_and_load_data (from handlers/chat_list.rs) - Phase 2: process_pending_chat_init (extracted from 70-line inline block in main.rs) - Phase 3: load_older_messages_if_needed (from handlers/chat.rs) No behaviour changes — pure refactoring. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,12 +6,14 @@
|
||||
//! - profile: Profile helper functions
|
||||
//! - chat: Keyboard input handling for open chat view
|
||||
//! - chat_list: Navigation and interaction in the chat list
|
||||
//! - chat_loader: All phases of chat message loading
|
||||
//! - compose: Text input, editing, and message composition
|
||||
//! - modal: Modal dialogs (delete confirmation, emoji picker, etc.)
|
||||
//! - search: Search functionality (chat search, message search)
|
||||
|
||||
pub mod chat;
|
||||
pub mod chat_list;
|
||||
pub mod chat_loader;
|
||||
pub mod clipboard;
|
||||
pub mod compose;
|
||||
pub mod global;
|
||||
@@ -19,6 +21,7 @@ pub mod modal;
|
||||
pub mod profile;
|
||||
pub mod search;
|
||||
|
||||
pub use chat_loader::{load_older_messages_if_needed, open_chat_and_load_data, process_pending_chat_init};
|
||||
pub use clipboard::*;
|
||||
pub use global::*;
|
||||
pub use profile::get_available_actions_count;
|
||||
|
||||
Reference in New Issue
Block a user