Skip to content

Commit e38177f

Browse files
committed
fix: update online presence logic and improve Kanban drop target condition
1 parent 0ac14a7 commit e38177f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/src/components/DirectMessages.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export default function DirectMessages({
4343
const [unread, setUnread] = useState<Record<string, number>>({});
4444
const socketRef = useRef<Socket | null>(null);
4545
const bottomRef = useRef<HTMLDivElement>(null);
46-
const online = usePresenceStore((s) => s.online);
46+
const presenceMembers = usePresenceStore((s) => s.members);
47+
const online = Object.entries(presenceMembers)
48+
.filter(([, v]) => v.status === "online")
49+
.map(([id]) => id);
4750

4851
// Fetch unread counts
4952
useEffect(() => {

frontend/src/components/KanbanBoard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ export default function KanbanBoard({
327327
</div>
328328
)}
329329
{dropTarget?.colKey === col.key &&
330-
dropTarget?.insertIdx >= visibleItems.length &&
330+
dropTarget?.insertIdx !== undefined &&
331+
dropTarget.insertIdx >= visibleItems.length &&
331332
dragTaskId !== null && (
332333
<div className="h-1 rounded-full bg-sky-400 mx-2 transition-all duration-150 animate-pulse" />
333334
)}

0 commit comments

Comments
 (0)