refac
This commit is contained in:
1 parent
b5da50f3df
commit
a40f6f2860
3 files changed
+7
-9
No files matched your search
@@ -61,10 +61,7 @@ export const refreshChatList = async (
|
||||
return { accepted: true, allLoaded };
|
||||
};
|
||||
|
||||
// The sidebar's folders keep their chat lists in local component state, refreshed
|
||||
// through a registry of per-folder callbacks that only the sidebar can reach.
|
||||
// Handlers registered here let other components (e.g. the open chat's menu)
|
||||
// request that refresh without a reference to the sidebar.
|
||||
// The sidebar owns folder state. This bridge lets other components refresh it.
|
||||
type FolderRefreshHandler = (folderId?: string | null, chat?: ChatListItem | null) => unknown;
|
||||
const folderRefreshHandlers = new Set<FolderRefreshHandler>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user