Skip to content

Commit

Permalink
Merge pull request #450 from OleksandraFedotova/develop
Browse files Browse the repository at this point in the history
Fixed All day events start time may be incorrect (iOS only) #337
  • Loading branch information
IVLIVS-III authored Nov 2, 2022
2 parents 05c3821 + d3d3927 commit 039f047
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ios/Classes/SwiftDeviceCalendarPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,13 @@ public class SwiftDeviceCalendarPlugin: NSObject, FlutterPlugin, EKEventViewDele
private func convertEkEventStatus(ekEventStatus: EKEventStatus?) -> EventStatus? {
switch ekEventStatus {
case .confirmed:
return EventStatus.CONFIRMED
return EventStatus.CONFIRMED
case .tentative:
return EventStatus.TENTATIVE
case .canceled:
return EventStatus.CANCELED
case .none?:
return EventStatus.NONE
case .canceled:
return EventStatus.CANCELED
case .none?:
return EventStatus.NONE
default:
return nil
}
Expand Down Expand Up @@ -815,13 +815,13 @@ public class SwiftDeviceCalendarPlugin: NSObject, FlutterPlugin, EKEventViewDele
ekEvent!.notes = description
ekEvent!.isAllDay = isAllDay
ekEvent!.startDate = startDate
if (isAllDay) { ekEvent!.endDate = startDate }
else {
ekEvent!.endDate = endDate

ekEvent!.endDate = endDate

if (!isAllDay) {
let timeZone = TimeZone(identifier: startTimeZoneString ?? TimeZone.current.identifier) ?? .current
ekEvent!.timeZone = timeZone
}

ekEvent!.calendar = ekCalendar!
ekEvent!.location = location

Expand Down

0 comments on commit 039f047

Please sign in to comment.