- Created a .cursorignore file to manage local environment files. - Updated .env.example to reflect changes in the public app URL. - Modified the gmail workspace configuration to include the drive-suite path. - Enhanced email view components to support attachment handling and fallback for plain text bodies. - Improved user experience by updating attachment display logic and integrating inline attachment support.
22 lines
701 B
TypeScript
22 lines
701 B
TypeScript
"use client"
|
|
|
|
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
|
import { apiClient } from "../client"
|
|
|
|
export function useReindexMessageAttachments(messageId: string | undefined) {
|
|
const queryClient = useQueryClient()
|
|
|
|
return useMutation({
|
|
mutationFn: () =>
|
|
apiClient.post<{ status: string }>(
|
|
`/mail/messages/${messageId}/attachments/reindex`
|
|
),
|
|
onSuccess: () => {
|
|
if (!messageId) return
|
|
queryClient.invalidateQueries({ queryKey: ["message-cid-map", messageId] })
|
|
queryClient.invalidateQueries({ queryKey: ["message-attachments", messageId] })
|
|
queryClient.invalidateQueries({ queryKey: ["message", messageId] })
|
|
},
|
|
})
|
|
}
|