@umituz/react-native-ai-generation-content 1.89.11 → 1.89.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.89.11",
3
+ "version": "1.89.13",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -31,10 +31,9 @@ export function useGalleryState(options: GalleryStateOptions): GalleryStateRetur
31
31
 
32
32
  // Auto-select creation when initialCreationId is provided
33
33
  useEffect(() => {
34
- if (initialCreationId && creations && creations.length > 0 && !hasAutoSelectedRef.current) {
34
+ if (initialCreationId && creations && creations.length > 0) {
35
35
  const creation = creations.find((c) => c.id === initialCreationId);
36
36
  if (creation) {
37
- hasAutoSelectedRef.current = true;
38
37
  setSelectedCreation(creation);
39
38
  }
40
39
  }
@@ -72,7 +72,13 @@ export function CreationsGalleryScreen({
72
72
 
73
73
  const filters = useGalleryFilters({ creations, statusOptions, mediaOptions, t });
74
74
 
75
- useAppFocusEffect(useCallback(() => { void refetch(); }, [refetch]));
75
+ useAppFocusEffect(useCallback(() => {
76
+ void refetch();
77
+ // Reset selection on focus if no initial ID is being enforced
78
+ if (!initialCreationId) {
79
+ galleryState.setSelectedCreation(null);
80
+ }
81
+ }, [refetch, initialCreationId, galleryState]));
76
82
 
77
83
  const filterButtons = useMemo(() =>
78
84
  createFilterButtons({