mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update stuff, but sneak peek still broken
This commit is contained in:
parent
88692a241a
commit
675f60c9f2
2 changed files with 3 additions and 36 deletions
|
|
@ -1290,9 +1290,7 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func shouldSuppressExtensionCenter(for payload: ExtensionLiveActivityPayload) -> Bool {
|
private func shouldSuppressExtensionCenter(for payload: ExtensionLiveActivityPayload) -> Bool {
|
||||||
guard vm.notchState == .closed else { return false }
|
vm.notchState == .closed
|
||||||
let config = payload.descriptor.sneakPeekConfig ?? .default
|
|
||||||
return config.enabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|
|
||||||
|
|
@ -266,12 +266,7 @@ struct ExtensionInlineSneakPeekView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private var trailingWidth: CGFloat {
|
private var trailingWidth: CGFloat {
|
||||||
guard let payload else { return max(leadingWidth, 120) }
|
max(leadingWidth * 0.9, 120)
|
||||||
return ExtensionLayoutMetrics.trailingWidth(
|
|
||||||
for: payload,
|
|
||||||
baseWidth: leadingWidth,
|
|
||||||
maxWidth: leadingWidth + centerWidth * 0.6
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var marqueeFrameWidth: CGFloat {
|
private var marqueeFrameWidth: CGFloat {
|
||||||
|
|
@ -343,33 +338,7 @@ struct ExtensionInlineSneakPeekView: View {
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var trailingWing: some View {
|
private var trailingWing: some View {
|
||||||
if let payload {
|
spectrumPlaceholder
|
||||||
let descriptor = payload.descriptor
|
|
||||||
switch resolvedExtensionTrailingRenderable(for: descriptor) {
|
|
||||||
case let .content(content):
|
|
||||||
if case .none = content {
|
|
||||||
spectrumPlaceholder
|
|
||||||
} else {
|
|
||||||
VStack(alignment: .trailing, spacing: 6) {
|
|
||||||
ExtensionEdgeContentView(
|
|
||||||
content: content,
|
|
||||||
accent: resolvedAccent,
|
|
||||||
availableWidth: trailingWidth,
|
|
||||||
alignment: .trailing
|
|
||||||
)
|
|
||||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
||||||
|
|
||||||
Spacer(minLength: 0)
|
|
||||||
}
|
|
||||||
.padding(.trailing, 8)
|
|
||||||
.padding(.vertical, 6)
|
|
||||||
}
|
|
||||||
case .indicator:
|
|
||||||
spectrumPlaceholder
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
spectrumPlaceholder
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue