toggleAction: { isOn, selectedDate in
var updatingUserData = userSettingManager.userData
switch isOn {
case true:
notificationManager.checkAndRequestPermission(completion: { allowed in
if allowed {
updatingUserData.isNotificationOn = true
notificationManager.scheduleNotification(date: selectedDate)
} else {
updatingUserData.isNotificationOn = false
}
})
토글버튼의 액션 클로저에서 비동기 작업을 요청.(view = MainActor)
notificationManager은 격리되지 않은 상태.