Skip to content

Commit

Permalink
Support LoopKit Package in Watch targets
Browse files Browse the repository at this point in the history
  • Loading branch information
gestrich committed Dec 17, 2023
1 parent 70d1860 commit e3000dc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions LoopKit/NotificationSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Foundation
import UserNotifications


public struct NotificationSettings: Equatable {
public enum AuthorizationStatus: String, Codable {
case notDetermined
Expand Down Expand Up @@ -61,7 +62,8 @@ public struct NotificationSettings: Equatable {
case banner
case alert
case unknown


#if os(iOS)
public init(_ alertStyle: UNAlertStyle) {
switch alertStyle {
case .none:
Expand All @@ -74,14 +76,16 @@ public struct NotificationSettings: Equatable {
self = .unknown
}
}
#endif
}

public enum ShowPreviewsSetting: String, Codable {
case always
case whenAuthenticated
case never
case unknown


#if os(iOS)
public init(_ showPreviewsSetting: UNShowPreviewsSetting) {
switch showPreviewsSetting {
case .always:
Expand All @@ -94,6 +98,7 @@ public struct NotificationSettings: Equatable {
self = .unknown
}
}
#endif
}

public enum TemporaryMuteAlertSetting: Codable, Equatable {
Expand Down

0 comments on commit e3000dc

Please sign in to comment.