fix: compile errors — frame API + sheet binding for let hlsRecorder

This commit is contained in:
yumoqing 2026-07-02 22:13:26 +08:00
parent 4c38b06860
commit 01116180d1

View File

@ -583,9 +583,14 @@ struct BricksAppView: View {
bridge.showToastMsg(error.localizedDescription) bridge.showToastMsg(error.localizedDescription)
} }
} }
.sheet(item: $bridge.hlsRecorder.pendingExportURL) { url in .sheet(isPresented: Binding<Bool>(
ActivityShareSheet(url: url) { get: { bridge.hlsRecorder.pendingExportURL != nil },
bridge.hlsRecorder.pendingExportURL = nil set: { if !$0 { bridge.hlsRecorder.pendingExportURL = nil } }
)) {
if let url = bridge.hlsRecorder.pendingExportURL {
ActivityShareSheet(url: url) {
bridge.hlsRecorder.pendingExportURL = nil
}
} }
} }
#endif #endif
@ -707,7 +712,7 @@ struct ControlToolbar: View {
Text(bridge.currentTrackLabel) Text(bridge.currentTrackLabel)
.font(.system(size: 11, design: .monospaced)) .font(.system(size: 11, design: .monospaced))
.foregroundColor(.white) .foregroundColor(.white)
.frame(minWidth: 50, height: 28) .frame(height: 28)
.padding(.horizontal, 4) .padding(.horizontal, 4)
.background(Color.white.opacity(0.15)) .background(Color.white.opacity(0.15))
.cornerRadius(4) .cornerRadius(4)