fix: fixed build error
4d5ebcdb
1 file(s) · +6 −2
| 43 | 43 | onFeedSelect?: (feedId: string | null) => void; |
|
| 44 | 44 | selectedPostId?: string | null; |
|
| 45 | 45 | onPostSelect?: (postId: string) => void; |
|
| 46 | + | onBulkStatusChange?: () => void; |
|
| 46 | 47 | } |
|
| 47 | 48 | ||
| 48 | 49 | export function AppSidebar({ |
|
| 50 | 51 | onFeedSelect = () => {}, |
|
| 51 | 52 | selectedPostId = null, |
|
| 52 | 53 | onPostSelect = () => {}, |
|
| 54 | + | onBulkStatusChange = () => {}, |
|
| 53 | 55 | ...props |
|
| 54 | 56 | }: AppSidebarProps) { |
|
| 55 | 57 | const [dialogOpen, setDialogOpen] = React.useState(false); |
|
| 189 | 191 | ||
| 190 | 192 | // Mark all visible posts as read |
|
| 191 | 193 | const handleMarkAllAsRead = React.useCallback(() => { |
|
| 194 | + | onBulkStatusChange(); |
|
| 192 | 195 | let markedCount = 0; |
|
| 193 | 196 | filteredPosts.forEach((post) => { |
|
| 194 | 197 | const existingStatus = allReadStatusesWithUnread.find( |
|
| 219 | 222 | toast.success( |
|
| 220 | 223 | `Marked ${markedCount} post${markedCount !== 1 ? "s" : ""} as read`, |
|
| 221 | 224 | ); |
|
| 222 | - | }, [filteredPosts, allReadStatusesWithUnread, evolu]); |
|
| 225 | + | }, [filteredPosts, allReadStatusesWithUnread, evolu, onBulkStatusChange]); |
|
| 223 | 226 | ||
| 224 | 227 | // Mark all visible posts as unread |
|
| 225 | 228 | const handleMarkAllAsUnread = React.useCallback(() => { |
|
| 229 | + | onBulkStatusChange(); |
|
| 226 | 230 | let unmarkedCount = 0; |
|
| 227 | 231 | filteredPosts.forEach((post) => { |
|
| 228 | 232 | const existingStatus = allReadStatusesWithUnread.find( |
|
| 253 | 257 | toast.success( |
|
| 254 | 258 | `Marked ${unmarkedCount} post${unmarkedCount !== 1 ? "s" : ""} as unread`, |
|
| 255 | 259 | ); |
|
| 256 | - | }, [filteredPosts, allReadStatusesWithUnread, evolu]); |
|
| 260 | + | }, [filteredPosts, allReadStatusesWithUnread, evolu, onBulkStatusChange]); |
|
| 257 | 261 | ||
| 258 | 262 | // Delete feed (soft delete using isDeleted flag) |
|
| 259 | 263 | const handleDeleteFeed = React.useCallback(() => { |
|