Skip to content

Commit

Permalink
Fix autorization request for local notifications #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Jul 7, 2023
1 parent 1edb185 commit e425af3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extension LocalNotificationService: LocalNotificationServiceProtocol {
}

public func requestAccess() async -> Result<Bool, AppError> {
let _ = try? await requestAuthorization()
let currentSettings = await notificationCenter.notificationSettings()
switch currentSettings.authorizationStatus {
case .notDetermined:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ public extension Product {
public extension Product {
var trialDaysCount: Int? {
guard let value = subscription?.introductoryOffer?.period.value,
let unit = subscription?.introductoryOffer?.period.unit else {
let unit = subscription?.introductoryOffer?.period.unit
else {
return nil
}
switch unit {
Expand Down

0 comments on commit e425af3

Please sign in to comment.