@umituz/react-native-settings 4.23.5 → 4.23.7

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": "4.23.5",
3
+ "version": "4.23.7",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -23,13 +23,11 @@ export function useFAQExpansion(): UseFAQExpansionResult {
23
23
 
24
24
  const toggleExpansion = useCallback((itemId: string) => {
25
25
  setExpandedItems(prev => {
26
- const newSet = new Set(prev);
27
- if (newSet.has(itemId)) {
28
- newSet.delete(itemId);
26
+ if (prev.has(itemId)) {
27
+ return new Set();
29
28
  } else {
30
- newSet.add(itemId);
29
+ return new Set([itemId]);
31
30
  }
32
- return newSet;
33
31
  });
34
32
  }, []);
35
33
 
@@ -63,9 +63,10 @@ export const SupportSection: React.FC<SupportSectionProps> = ({
63
63
  const handleFeedbackSubmit = async (data: { type: any; rating: number; description: string; title: string }) => {
64
64
  if (feedbackConfig.config?.onSubmit) {
65
65
  setIsSubmitting(true);
66
+ setModalVisible(false);
66
67
  try {
68
+ await new Promise(resolve => setTimeout(resolve, 300));
67
69
  await feedbackConfig.config.onSubmit(data);
68
- setModalVisible(false);
69
70
  } catch {
70
71
  // Silent error handling
71
72
  } finally {