mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update Timer Lock Screen Widget
This commit is contained in:
parent
6d6ffff5b0
commit
8be0c6540f
12 changed files with 636 additions and 7 deletions
|
|
@ -140,9 +140,18 @@ struct TimerLiveActivity: View {
|
|||
return timerPresets.first { $0.id == presetId }?.color
|
||||
}
|
||||
|
||||
private var shouldShowControlWindow: Bool {
|
||||
controlWindowEnabled && !shouldDisplayLabel && timerManager.isTimerActive && !timerManager.isExternalTimerActive
|
||||
}
|
||||
private var shouldShowControlWindow: Bool {
|
||||
#if os(macOS)
|
||||
let lockSuppressed = !LockScreenManager.shared.currentLockStatus
|
||||
#else
|
||||
let lockSuppressed = true
|
||||
#endif
|
||||
return controlWindowEnabled
|
||||
&& !shouldDisplayLabel
|
||||
&& timerManager.isTimerActive
|
||||
&& !timerManager.isExternalTimerActive
|
||||
&& lockSuppressed
|
||||
}
|
||||
|
||||
private func measureTextWidth(_ text: String, font: PlatformFont) -> CGFloat {
|
||||
let attributes: [NSAttributedString.Key: Any] = [.font: font]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue