Merge branch 'charlesmchen/appLaunchTime'

This commit is contained in:
Matthew Chen 2018-08-08 14:57:15 -04:00
commit e4a123bcef
5 changed files with 5 additions and 9 deletions

View File

@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.28.1</string>
<string>2.29.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@ -38,7 +38,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.28.1.5</string>
<string>2.29.0.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LOGS_EMAIL</key>

View File

@ -590,7 +590,7 @@ typedef void (^OrphanDataBlock)(OWSOrphanData *);
// We need to avoid cleaning up new attachments and files that are still in the process of
// being created/written, so we don't clean up anything recent.
const NSTimeInterval kMinimumOrphanAgeSeconds = CurrentAppContext().isRunningTests ? 0.f : 15 * kMinuteInterval;
NSDate *appLaunchTime = AppVersion.sharedInstance.appLaunchTime;
NSDate *appLaunchTime = CurrentAppContext().appLaunchTime;
NSTimeInterval thresholdTimestamp = appLaunchTime.timeIntervalSince1970 - kMinimumOrphanAgeSeconds;
NSDate *thresholdDate = [NSDate dateWithTimeIntervalSince1970:thresholdTimestamp];
[databaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {

View File

@ -14,8 +14,6 @@
@property (atomic, readonly) NSString *lastCompletedLaunchMainAppVersion;
@property (atomic, readonly) NSString *lastCompletedLaunchSAEAppVersion;
@property (atomic, readonly) NSDate *appLaunchTime;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)sharedInstance;

View File

@ -43,8 +43,6 @@ NSString *const kNSUserDefaults_LastCompletedLaunchAppVersion_SAE
- (void)configure {
OWSAssertIsOnMainThread();
_appLaunchTime = [NSDate new];
self.currentAppVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
// The version of the app when it was first launched.

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>2.28.1</string>
<string>2.29.0</string>
<key>CFBundleVersion</key>
<string>2.28.1.5</string>
<string>2.29.0.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSAppTransportSecurity</key>