shameful comment
This commit is contained in:
@ -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}
|
||||||
|
Reference in New Issue
Block a user