diff options
Diffstat (limited to 'Firestore/Source/API/FIRDocumentSnapshot.m')
-rw-r--r-- | Firestore/Source/API/FIRDocumentSnapshot.m | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Firestore/Source/API/FIRDocumentSnapshot.m b/Firestore/Source/API/FIRDocumentSnapshot.m index 0d60033..e4e75c6 100644 --- a/Firestore/Source/API/FIRDocumentSnapshot.m +++ b/Firestore/Source/API/FIRDocumentSnapshot.m @@ -116,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN } return [self convertedObject:[self.internalDocument data] - options:[self convertedSnapshotOptions:options]]; + options:[FSTFieldValueOptions fieldValueOptions:options]]; } - (nullable id)valueForField:(id)field { @@ -135,7 +135,7 @@ NS_ASSUME_NONNULL_BEGIN } FSTFieldValue *fieldValue = [[self.internalDocument data] valueForPath:fieldPath.internalValue]; - return [self convertedValue:fieldValue options:[self convertedSnapshotOptions:options]]; + return [self convertedValue:fieldValue options:[FSTFieldValueOptions fieldValueOptions:options]]; } - (nullable id)objectForKeyedSubscript:(id)key { @@ -187,20 +187,6 @@ NS_ASSUME_NONNULL_BEGIN return result; } -/** Create a field value option from a snapshot option. */ -- (FSTFieldValueOptions *)convertedSnapshotOptions:(FIRSnapshotOptions *)snapshotOptions { - switch (snapshotOptions.serverTimestampBehavior) { - case FIRServerTimestampBehaviorEstimate: - return [[FSTFieldValueOptions alloc] - initWithServerTimestampBehavior:FSTServerTimestampBehaviorEstimate]; - case FIRServerTimestampBehaviorPrevious: - return [[FSTFieldValueOptions alloc] - initWithServerTimestampBehavior:FSTServerTimestampBehaviorPrevious]; - default: - return [FSTFieldValueOptions defaultOptions]; - } -} - @end NS_ASSUME_NONNULL_END |