@umituz/react-native-ai-generation-content 1.12.17 → 1.12.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.12.17",
3
+ "version": "1.12.18",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -9,7 +9,6 @@ import {
9
9
  AlertMode,
10
10
  type BottomSheetModalRef
11
11
  } from "@umituz/react-native-design-system";
12
- import { useFocusEffect } from "@react-navigation/native";
13
12
  import { useCreations } from "../hooks/useCreations";
14
13
  import { useDeleteCreation } from "../hooks/useDeleteCreation";
15
14
  import { useCreationsFilter } from "../hooks/useCreationsFilter";
@@ -92,15 +91,6 @@ export function CreationsGalleryScreen({
92
91
  const [selectedItemIds, setSelectedItemIds] = useState<string[]>([]);
93
92
  const [isSelectionMode, setIsSelectionMode] = useState(false);
94
93
 
95
-
96
-
97
- // Refetch creations when screen comes into focus
98
- useFocusEffect(
99
- useCallback(() => {
100
- refetch();
101
- }, [refetch])
102
- );
103
-
104
94
  // Prepare data for UI using utils
105
95
  const translatedTypes = useMemo(() => getTranslatedTypes(config, t), [config, t]);
106
96
  const allCategories = useMemo(() => getFilterCategoriesFromConfig(config, t), [config, t]);
@@ -205,22 +195,20 @@ export function CreationsGalleryScreen({
205
195
  }
206
196
  contentContainerStyle={{ paddingHorizontal: 0 }}
207
197
  >
208
- {(!creations || creations?.length === 0) && !isLoading ? null : (
209
- showGalleryHeader ? (
210
- <GalleryHeader
211
- title={showScreenHeader || isSelectionMode ? '' : screenTitle}
212
- count={filtered.length}
213
- countLabel=''
214
- subtitle={showCount ? t(config.translations.photoCount, { count: filtered.length }) : undefined}
215
- isFiltered={isFiltered}
216
- filterLabel={t(config.translations.filterLabel) || 'Filter'}
217
- onFilterPress={() => filterSheetRef.current?.present()}
218
- onFavoritesPress={() => setShowOnlyFavorites(!showOnlyFavorites)}
219
- showOnlyFavorites={showOnlyFavorites}
220
- isFilterEnabled={enableFilter}
221
- showCount={showCount}
222
- />
223
- ) : null
198
+ {creations && creations.length > 0 && showGalleryHeader && (
199
+ <GalleryHeader
200
+ title={showScreenHeader || isSelectionMode ? '' : screenTitle}
201
+ count={filtered.length}
202
+ countLabel=''
203
+ subtitle={showCount ? t(config.translations.photoCount, { count: filtered.length }) : undefined}
204
+ isFiltered={isFiltered}
205
+ filterLabel={t(config.translations.filterLabel) || 'Filter'}
206
+ onFilterPress={() => filterSheetRef.current?.present()}
207
+ onFavoritesPress={() => setShowOnlyFavorites(!showOnlyFavorites)}
208
+ showOnlyFavorites={showOnlyFavorites}
209
+ isFilterEnabled={enableFilter}
210
+ showCount={showCount}
211
+ />
224
212
  )}
225
213
 
226
214
  {/* Main Content Grid - handles empty/loading via ListEmptyComponent */}