Skip to content

Commit 3475b66

Browse files
committed
solve rebase error
1 parent 2e18c4a commit 3475b66

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Firestore/Swift/Source/SwiftAPI/Pipeline/RealtimePipeline.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,31 @@ struct PipelineListenOptions: Sendable, Equatable, Hashable {
6969
self.includeMetadataChanges = includeMetadataChanges
7070
self.source = source
7171
bridge = __PipelineListenOptionsBridge(
72-
serverTimestampBehavior: (self.serverTimestamps ?? .none).rawValue,
72+
serverTimestampBehavior: PipelineListenOptions
73+
.toRawValue(servertimestamp: self.serverTimestamps ?? .none),
7374
includeMetadata: self.includeMetadataChanges ?? false,
7475
source: self.source ?? ListenSource.default
7576
)
7677
}
78+
79+
private static func toRawValue(servertimestamp: ServerTimestampBehavior) -> String {
80+
switch servertimestamp {
81+
case .none:
82+
return "none"
83+
case .estimate:
84+
return "estimate"
85+
case .previous:
86+
return "previous"
87+
default:
88+
fatalError("Unknown server timestamp behavior")
89+
}
90+
}
7791
}
7892

7993
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
8094
struct RealtimePipeline: @unchecked Sendable {
8195
private var stages: [Stage]
96+
8297
let bridge: RealtimePipelineBridge
8398
let db: Firestore
8499

0 commit comments

Comments
 (0)