mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-10-23 05:32:18 +00:00
perf: reduce chat list and message handling latency
This commit is contained in:
1 parent
988827a3bc
commit
df76526b5d
14 files changed
+376
-45
No files matched your search
@@ -77,6 +77,13 @@ class IChatStore
|
||||
* @return true if updated
|
||||
*/
|
||||
virtual bool updateMessageStatus(MessageId msg_id, MessageStatus status) = 0;
|
||||
|
||||
/**
|
||||
* @brief Flush pending buffered writes to persistent storage
|
||||
*
|
||||
* Default implementation is a no-op for stores that do not buffer.
|
||||
*/
|
||||
virtual void flush() {}
|
||||
};
|
||||
|
||||
} // namespace chat
|
||||
@@ -96,6 +96,7 @@ class ChatService
|
||||
* @brief Process incoming messages (call from mesh task)
|
||||
*/
|
||||
void processIncoming();
|
||||
void flushStore();
|
||||
|
||||
void addIncomingTextObserver(IncomingTextObserver* observer);
|
||||
void removeIncomingTextObserver(IncomingTextObserver* observer);
|
||||
|
||||
Reference in new issue
Block a user