fix(lists): prevent duplicate list item rendering on create
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 59s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 59s
This commit is contained in:
1 parent
5cfa390ee0
commit
f1af10ce1c
2 files changed
+43
-15
No files matched your search
@@ -586,7 +586,7 @@ func (s *Server) handleCaptureInbox(w http.ResponseWriter, r *http.Request) {
|
||||
thought = converted
|
||||
if target == "list_item" && targetListID != "" {
|
||||
if lst, lErr := s.store.GetListByID(userID, targetListID); lErr == nil && lst != nil {
|
||||
s.wsHub.BroadcastListEvent(lst.ID, "ITEM_CREATED", lst)
|
||||
s.wsHub.BroadcastListEvent(lst.ID, "LIST_UPDATED", lst)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -663,7 +663,7 @@ func (s *Server) handleTriageAction(w http.ResponseWriter, r *http.Request) {
|
||||
// If converted to a list item, broadcast via WebSocket to the space
|
||||
if convertTo == "list_item" && targetListID != "" {
|
||||
if lst, err := s.store.GetListByID(userID, targetListID); err == nil && lst != nil {
|
||||
s.wsHub.BroadcastListEvent(lst.ID, "ITEM_CREATED", lst)
|
||||
s.wsHub.BroadcastListEvent(lst.ID, "LIST_UPDATED", lst)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user