Skip to content

Commit

Permalink
Add a computed property for the snooze store.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Jul 22, 2024
1 parent 7264f32 commit ebd1e57
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ final public class NetworkProtectionSnoozeTimingStore {
}
}

public var isSnoozing: Bool {
return activeTiming != nil
}

public var activeTiming: SnoozeTiming? {
get {
guard let data = userDefaults.data(forKey: Self.snoozeTimingKey) else { return nil }
Expand Down

0 comments on commit ebd1e57

Please sign in to comment.