Update SettingsContext.tsx

This commit is contained in:
Marcos Rodriguez Velez 2024-04-18 13:50:49 -04:00
parent 60990636f0
commit 457aaaf6b4
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7

View File

@ -187,19 +187,16 @@ export const SettingsProvider: React.FC<{ children: React.ReactNode }> = ({ chil
setIsQuickActionsEnabled(value);
}, []);
const setIsPrivacyBlurEnabledState = useCallback((value: boolean) => {
setIsPrivacyBlurEnabled(value);
if (!value) {
presentAlert({ message: 'Privacy blur has been disabled.' });
}
}, []);
useEffect(() => {
console.log(`Privacy blur: ${isPrivacyBlurEnabled}`);
if (!isPrivacyBlurEnabled) {
presentAlert({ message: 'Privacy blur has been disabled.' });
}
}, [isPrivacyBlurEnabled]);
const setIsPrivacyBlurEnabledState = useCallback(
(value: boolean) => {
setIsPrivacyBlurEnabled(value);
console.log(`Privacy blur: ${isPrivacyBlurEnabled}`);
if (!value) {
presentAlert({ message: 'Privacy blur has been disabled.' });
}
},
[isPrivacyBlurEnabled],
);
const value = useMemo(
() => ({