Skip to content

Commit

Permalink
Merge pull request LoopKit#519 from gestrich/bugfix/2023-12/bg/watch-…
Browse files Browse the repository at this point in the history
…targets

Support LoopKit Package in Watch targets
  • Loading branch information
ps2 authored Dec 17, 2023
2 parents 70d1860 + e3000dc commit d31a8c2
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 d31a8c2

Please sign in to comment.