mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-08-27 13:09:49 +00:00
perf: reduce chat list and message handling latency
This commit is contained in:
@@ -33,6 +33,7 @@ class ChatConversationScreen
|
||||
void addMessage(const chat::ChatMessage& msg);
|
||||
void clearMessages();
|
||||
void scrollToBottom();
|
||||
bool updateMessageStatus(chat::MessageId msg_id, chat::MessageStatus status);
|
||||
|
||||
void setActionCallback(void (*cb)(ActionIntent intent, void*), void* user_data);
|
||||
bool isAlive() const { return guard_ && guard_->alive; }
|
||||
|
||||
@@ -140,6 +140,8 @@ class ChatMessageListScreen
|
||||
message_list::input::Controller input_controller_{};
|
||||
|
||||
void rebuildList();
|
||||
bool updateListInPlace(const std::vector<chat::ConversationMeta>& convs);
|
||||
void updateListItem(size_t index, const chat::ConversationMeta& conv);
|
||||
void updateFilterHighlight();
|
||||
void setFilterMode(FilterMode mode);
|
||||
|
||||
|
||||
@@ -75,8 +75,14 @@ class UiController : public IChatUiRuntime
|
||||
void handleChannelSelected(const chat::ConversationId& conv);
|
||||
void handleSendMessage(const std::string& text);
|
||||
void refreshUnreadCounts();
|
||||
void refreshUnreadCounts(bool force_reload);
|
||||
void cleanupComposeIme();
|
||||
bool isTeamConversation(const chat::ConversationId& conv) const;
|
||||
void syncConversationListFromStore();
|
||||
void normalizeConversationNames(std::vector<chat::ConversationMeta>& convs) const;
|
||||
void applyConversationListToUi();
|
||||
void updateConversationMetaForMessage(const chat::ChatMessage& msg, bool increment_unread);
|
||||
bool updateConversationViewForIncoming(const chat::ChatMessage& msg);
|
||||
void refreshTeamConversation();
|
||||
void startTeamConversationTimer();
|
||||
void stopTeamConversationTimer();
|
||||
@@ -121,6 +127,8 @@ class UiController : public IChatUiRuntime
|
||||
uint64_t key_verify_nonce_ = 0;
|
||||
bool key_verify_expects_number_ = false;
|
||||
bool key_verify_can_trust_ = false;
|
||||
std::vector<chat::ConversationMeta> cached_conversations_;
|
||||
bool conversation_list_dirty_ = true;
|
||||
|
||||
static void team_position_icon_event_cb(lv_event_t* e);
|
||||
static void team_position_cancel_event_cb(lv_event_t* e);
|
||||
|
||||
Reference in New Issue
Block a user