shameful comment

This commit is contained in:
2025-04-26 20:36:10 +01:00
parent d34805030f
commit 84d66a1c3b

View File

@ -44,6 +44,15 @@ const getAllValues = (object: object): Array<string> => {
return loop([], object); return loop([], object);
}; };
// On fast connections (or locally), the DB will send the complete update before the image has been fully saved.
// This is because it shouldn't really be an update, and that is hacky but hey. It works.
// The tech debt will be collected eventually.
//
// AND MORE IMPORTANTLY. The fucking AI agents aren't done.
// hhhhhhhhhhhhhhhhhhhhmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
// wait groups.
const BIG_SHAME_TIMEOUT = 5000;
const SearchImageContext = createContext<SearchImageStore>(); const SearchImageContext = createContext<SearchImageStore>();
export const SearchImageContextProvider: Component<ParentProps> = (props) => { export const SearchImageContextProvider: Component<ParentProps> = (props) => {
const [images, { refetch }] = createResource(() => const [images, { refetch }] = createResource(() =>
@ -59,7 +68,7 @@ export const SearchImageContextProvider: Component<ParentProps> = (props) => {
<SearchImageContext.Provider <SearchImageContext.Provider
value={{ value={{
images, images,
onRefetchImages: refetch, onRefetchImages: () => setTimeout(refetch, BIG_SHAME_TIMEOUT),
}} }}
> >
{props.children} {props.children}