Release 1.0.0 baseline

This commit is contained in:
alexandrev-tibco
2026-02-26 10:27:09 +01:00
parent e593453abd
commit c5c7e3d2e4
24 changed files with 600 additions and 168 deletions
+5 -2
View File
@@ -23,6 +23,7 @@ struct SettingsView: View {
.toolbarBackground(Color.mealMoodBackground, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.environment(\.isEnabled, true)
.toast(isShowing: $viewModel.showToast, message: viewModel.toastMessage)
}
@ViewBuilder
@@ -64,7 +65,8 @@ struct SettingsView: View {
Task {
let granted = await viewModel.requestCalendarAccess()
if granted {
settings.syncEnabled = true
let hasCalendar = viewModel.ensureValidCalendarSelection(settings: settings)
settings.syncEnabled = hasCalendar
}
}
} else {
@@ -214,7 +216,8 @@ struct SettingsView: View {
.tint(.mealMoodCoral)
.onAppear {
if settings.syncEnabled {
viewModel.loadCalendars()
let hasCalendar = viewModel.ensureValidCalendarSelection(settings: settings)
settings.syncEnabled = hasCalendar
}
}
.alert("calendar_permission_title", isPresented: $viewModel.showCalendarPermissionAlert) {