Refactor: Implement multi-item inventory for Pad Tracker and dynamic navigation
This commit is contained in:
@@ -121,7 +121,7 @@ class _PrivacySettingsScreenState extends ConsumerState<PrivacySettingsScreen> {
|
||||
title: const Text('Sync Period Days'),
|
||||
subtitle: const Text('Automatically sync your period start and end dates to your health app.'),
|
||||
value: syncPeriodToHealth,
|
||||
onChanged: (value) async {
|
||||
onChanged: _hasPermissions ? (value) async {
|
||||
if (value) {
|
||||
await _syncPeriodDays(true);
|
||||
} else {
|
||||
@@ -130,8 +130,7 @@ class _PrivacySettingsScreenState extends ConsumerState<PrivacySettingsScreen> {
|
||||
setState(() {
|
||||
syncPeriodToHealth = value; // Update local state for toggle
|
||||
});
|
||||
},
|
||||
enabled: _hasPermissions, // Only enable if connected
|
||||
} : null,
|
||||
),
|
||||
// TODO: Add more privacy settings if needed
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user