@umituz/react-native-ai-generation-content 1.89.17 → 1.89.18

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.17",
3
+ "version": "1.89.18",
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",
@@ -56,8 +56,8 @@ export function useGalleryState(options: GalleryStateOptions): GalleryStateRetur
56
56
  );
57
57
 
58
58
  const showPreview = useMemo(
59
- () => Boolean(selectedCreation && hasMediaToShow),
60
- [selectedCreation, hasMediaToShow]
59
+ () => Boolean(selectedCreation), // More lenient - show preview if creation is selected
60
+ [selectedCreation]
61
61
  );
62
62
 
63
63
  return {
@@ -100,12 +100,19 @@ export function CreationsGalleryScreen({
100
100
  );
101
101
 
102
102
  const getItemCallbacks = useCallback((item: Creation) => ({
103
- onPress: () => onCreationPress ? onCreationPress(item) : callbacks.handleCardPress(item),
103
+ onPress: () => {
104
+ // Always call custom handler if provided
105
+ if (onCreationPress) {
106
+ onCreationPress(item);
107
+ }
108
+ // Always show preview when card is pressed
109
+ galleryState.setSelectedCreation(item);
110
+ },
104
111
  onShare: async () => callbacks.handleShareCard(item),
105
112
  onDelete: () => callbacks.handleDelete(item),
106
113
  onFavorite: () => callbacks.handleFavorite(item),
107
114
  onPostToFeed: onShareToFeed ? () => onShareToFeed(item) : undefined,
108
- }), [callbacks, onCreationPress, onShareToFeed]);
115
+ }), [callbacks, onCreationPress, onShareToFeed, galleryState]);
109
116
 
110
117
  const [pageLimit, setPageLimit] = useState(6);
111
118