aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/API/FIRFirestoreSettings.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/API/FIRFirestoreSettings.mm')
-rw-r--r--Firestore/Source/API/FIRFirestoreSettings.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Firestore/Source/API/FIRFirestoreSettings.mm b/Firestore/Source/API/FIRFirestoreSettings.mm
index 9677ff6..8f998ec 100644
--- a/Firestore/Source/API/FIRFirestoreSettings.mm
+++ b/Firestore/Source/API/FIRFirestoreSettings.mm
@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
static NSString *const kDefaultHost = @"firestore.googleapis.com";
static const BOOL kDefaultSSLEnabled = YES;
static const BOOL kDefaultPersistenceEnabled = YES;
+// TODO(b/73820332): flip the default.
+static const BOOL kDefaultTimestampsInSnapshotsEnabled = NO;
@implementation FIRFirestoreSettings
@@ -32,6 +34,7 @@ static const BOOL kDefaultPersistenceEnabled = YES;
_sslEnabled = kDefaultSSLEnabled;
_dispatchQueue = dispatch_get_main_queue();
_persistenceEnabled = kDefaultPersistenceEnabled;
+ _timestampsInSnapshotsEnabled = kDefaultTimestampsInSnapshotsEnabled;
}
return self;
}
@@ -47,7 +50,8 @@ static const BOOL kDefaultPersistenceEnabled = YES;
return [self.host isEqual:otherSettings.host] &&
self.isSSLEnabled == otherSettings.isSSLEnabled &&
self.dispatchQueue == otherSettings.dispatchQueue &&
- self.isPersistenceEnabled == otherSettings.isPersistenceEnabled;
+ self.isPersistenceEnabled == otherSettings.isPersistenceEnabled &&
+ self.timestampsInSnapshotsEnabled == otherSettings.timestampsInSnapshotsEnabled;
}
- (NSUInteger)hash {
@@ -55,6 +59,7 @@ static const BOOL kDefaultPersistenceEnabled = YES;
result = 31 * result + (self.isSSLEnabled ? 1231 : 1237);
// Ignore the dispatchQueue to avoid having to deal with sizeof(dispatch_queue_t).
result = 31 * result + (self.isPersistenceEnabled ? 1231 : 1237);
+ result = 31 * result + (self.timestampsInSnapshotsEnabled ? 1231 : 1237);
return result;
}
@@ -64,6 +69,7 @@ static const BOOL kDefaultPersistenceEnabled = YES;
copy.sslEnabled = _sslEnabled;
copy.dispatchQueue = _dispatchQueue;
copy.persistenceEnabled = _persistenceEnabled;
+ copy.timestampsInSnapshotsEnabled = _timestampsInSnapshotsEnabled;
return copy;
}