@umituz/react-native-settings 1.3.0 → 1.3.2

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-settings",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -19,7 +19,6 @@ import { useTheme } from '@umituz/react-native-design-system-theme';
19
19
  import { ScreenLayout } from '@umituz/react-native-design-system';
20
20
  import { SettingItem } from '../components/SettingItem';
21
21
  import { getLanguageByCode, useLocalization } from '@umituz/react-native-localization';
22
- import { useTranslation } from 'react-i18next';
23
22
  import { SettingsConfig } from './types';
24
23
 
25
24
  // Optional notification service - only import if package is available
@@ -77,8 +76,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
77
76
  }) => {
78
77
  const navigation = useNavigation();
79
78
  const { theme, themeMode } = useTheme();
80
- const { currentLanguage } = useLocalization();
81
- const { t } = useTranslation();
79
+ const { currentLanguage, t } = useLocalization();
82
80
 
83
81
  const currentLang = getLanguageByCode(currentLanguage);
84
82
  const languageDisplay = currentLang ? `${currentLang.flag} ${currentLang.nativeName}` : 'English';
@@ -127,6 +125,17 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
127
125
  navigation.navigate('Notifications' as never);
128
126
  };
129
127
 
128
+ // Debug: Log features to help diagnose empty screen issues
129
+ /* eslint-disable-next-line no-console */
130
+ if (__DEV__) {
131
+ console.log('[SettingsScreen] Features:', features);
132
+ console.log('[SettingsScreen] Config:', config);
133
+ console.log('[SettingsScreen] Navigation state:', navigation.getState());
134
+ }
135
+
136
+ // Check if any features are enabled
137
+ const hasAnyFeatures = features.appearance || features.notifications || features.about || features.legal;
138
+
130
139
  return (
131
140
  <ScreenLayout testID="settings-screen" hideScrollIndicator>
132
141
  {/* Appearance Section */}
@@ -186,6 +195,15 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
186
195
  )}
187
196
  </List.Section>
188
197
  )}
198
+
199
+ {/* Fallback: Show message if no features are enabled */}
200
+ {!hasAnyFeatures && (
201
+ <List.Section>
202
+ <List.Subheader style={{ color: theme.colors.textSecondary }}>
203
+ {t('settings.noOptionsAvailable') || 'No settings available'}
204
+ </List.Subheader>
205
+ </List.Section>
206
+ )}
189
207
  </ScreenLayout>
190
208
  );
191
209
  };