mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Update phases
This commit is contained in:
parent
3fffb22cf7
commit
79f41cb69e
6 changed files with 289 additions and 13 deletions
|
|
@ -52,6 +52,7 @@ struct ContentView: View {
|
|||
@ObservedObject var capsLockManager = CapsLockManager.shared
|
||||
@ObservedObject var extensionLiveActivityManager = ExtensionLiveActivityManager.shared
|
||||
@ObservedObject var extensionNotchExperienceManager = ExtensionNotchExperienceManager.shared
|
||||
@ObservedObject var localSendService = LocalSendService.shared
|
||||
@State private var downloadManager = DownloadManager.shared
|
||||
|
||||
@Default(.enableStatsFeature) var enableStatsFeature
|
||||
|
|
@ -293,6 +294,19 @@ struct ContentView: View {
|
|||
private var shouldUseHiddenEdgeHoverPolling: Bool {
|
||||
shouldHideUntilHover && !lockScreenManager.isLocked
|
||||
}
|
||||
|
||||
/// Whether the LocalSend live activity should be shown
|
||||
private var localSendLiveActivityActive: Bool {
|
||||
localSendService.isSending ||
|
||||
localSendService.transferState == .completed ||
|
||||
isLocalSendFailedOrRejected
|
||||
}
|
||||
|
||||
private var isLocalSendFailedOrRejected: Bool {
|
||||
if case .failed = localSendService.transferState { return true }
|
||||
if case .rejected = localSendService.transferState { return true }
|
||||
return false
|
||||
}
|
||||
|
||||
/// Pill shape for Dynamic Island mode with animated corner radius transitions.
|
||||
private var currentPillShape: DynamicIslandPillShape {
|
||||
|
|
@ -738,6 +752,9 @@ struct ContentView: View {
|
|||
} else if (!coordinator.expandingView.show || coordinator.expandingView.type == .download) && vm.notchState == .closed && downloadManager.isDownloading && Defaults[.enableDownloadListener] && !vm.hideOnClosed {
|
||||
DownloadLiveActivity()
|
||||
.transition(.blurReplace.animation(.interactiveSpring(dampingFraction: 1.2)))
|
||||
} else if !coordinator.expandingView.show && vm.notchState == .closed && localSendLiveActivityActive && !vm.hideOnClosed {
|
||||
LocalSendLiveActivity()
|
||||
.transition(.blurReplace.animation(.interactiveSpring(dampingFraction: 1.2)))
|
||||
} else if (!coordinator.expandingView.show || coordinator.expandingView.type == .doNotDisturb) && vm.notchState == .closed && Defaults[.enableDoNotDisturbDetection] && Defaults[.showDoNotDisturbIndicator] && (doNotDisturbManager.isDoNotDisturbActive || doNotDisturbManager.isFocusToastDismissing) && !vm.hideOnClosed && !lockScreenManager.isLocked {
|
||||
DoNotDisturbLiveActivity()
|
||||
} else if (!coordinator.expandingView.show || coordinator.expandingView.type == .lockScreen) && vm.notchState == .closed && (lockScreenManager.isLocked || !lockScreenManager.isLockIdle) && Defaults[.enableLockScreenLiveActivity] && !vm.hideOnClosed {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue