@umituz/react-native-settings 5.2.25 → 5.2.27

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": "5.2.25",
3
+ "version": "5.2.27",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -39,13 +39,11 @@ export const useTranslationFunction = () => {
39
39
  }
40
40
 
41
41
  let finalResult: string;
42
- let translationFound = false;
43
42
 
44
43
  // If key already has namespace separator (:), use as-is
45
44
  if (key.includes(':')) {
46
45
  const result = i18nextT(key, options);
47
46
  finalResult = typeof result === 'string' ? result : key;
48
- translationFound = finalResult !== key && finalResult !== options.defaultValue;
49
47
  } else {
50
48
  // Auto-detect namespace from first dot segment
51
49
  const firstDotIndex = key.indexOf('.');
@@ -60,24 +58,20 @@ export const useTranslationFunction = () => {
60
58
 
61
59
  if (namespacedResult !== namespacedKey && namespacedResult !== restOfKey) {
62
60
  finalResult = typeof namespacedResult === 'string' ? namespacedResult : key;
63
- translationFound = true;
64
61
  } else {
65
62
  // Fallback to original key
66
63
  const result = i18nextT(key, options);
67
64
  finalResult = typeof result === 'string' ? result : key;
68
- translationFound = finalResult !== key && finalResult !== options.defaultValue;
69
65
  }
70
66
  } else {
71
67
  // Fallback to original key
72
68
  const result = i18nextT(key, options);
73
69
  finalResult = typeof result === 'string' ? result : key;
74
- translationFound = finalResult !== key && finalResult !== options.defaultValue;
75
70
  }
76
71
  } else {
77
72
  // Fallback to original key
78
73
  const result = i18nextT(key, options);
79
74
  finalResult = typeof result === 'string' ? result : key;
80
- translationFound = finalResult !== key && finalResult !== options.defaultValue;
81
75
  }
82
76
  }
83
77
 
@@ -11,7 +11,6 @@
11
11
 
12
12
  import { useMemo } from 'react';
13
13
  import { createStore, storageService } from '@umituz/react-native-design-system';
14
- import { excludeTransientState } from '../../../../infrastructure/storage/storeConfig';
15
14
  import type { Reminder, QuietHoursConfig, NotificationPreferences } from '../services/types';
16
15
 
17
16
  // ============================================================================
@@ -200,24 +199,3 @@ export const useEnabledReminders = () => {
200
199
  export const useReminderById = (id: string) =>
201
200
  useNotificationStore(state => state.reminders.find(r => r.id === id));
202
201
 
203
- // ============================================================================
204
- // LEGACY COMPATIBILITY HOOK (for smooth migration)
205
- // ============================================================================
206
-
207
- /**
208
- * @deprecated Use useNotificationStore directly or specific selectors
209
- * Kept temporarily for backward compatibility during migration
210
- */
211
- export const useNotifications = () => {
212
- const hasPermissions = useNotificationPermissions();
213
- const isInitialized = useNotificationInitialized();
214
- const setPermissions = useNotificationStore(state => state.setPermissions);
215
- const setInitialized = useNotificationStore(state => state.setInitialized);
216
-
217
- return {
218
- hasPermissions,
219
- isInitialized,
220
- setPermissions,
221
- setInitialized,
222
- };
223
- };
@@ -86,7 +86,7 @@ export interface BaseStoreState {
86
86
  export const excludeTransientState = <T extends BaseStoreState>(
87
87
  state: T
88
88
  ): Partial<T> => {
89
- const { isLoading, isInitialized, ...persistedState } = state;
89
+ const { isLoading: _isLoading, isInitialized: _isInitialized, ...persistedState } = state;
90
90
  return persistedState as Partial<T>;
91
91
  };
92
92