From 8e427111efd8b955cf1f2cd285b1ce74cf5ea3d2 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 29 Jan 2018 13:43:37 -0500 Subject: [PATCH] Clean up ahead of PR. --- Signal/src/AppDelegate.m | 2 ++ SignalServiceKit/src/Util/NSDate+OWS.h | 4 --- SignalServiceKit/src/Util/NSDate+OWS.mm | 25 ------------------- .../ShareViewController.swift | 2 ++ 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 803cf51a3..34ddec369 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -826,6 +826,8 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [OWSPreferences setIsRegistered:[TSAccountManager isRegistered]]; + // Note that this does much more than set a flag; + // it will also run all deferred blocks. [AppReadiness setAppIsReady]; if ([TSAccountManager isRegistered]) { diff --git a/SignalServiceKit/src/Util/NSDate+OWS.h b/SignalServiceKit/src/Util/NSDate+OWS.h index 039ca12de..eb10dfa38 100755 --- a/SignalServiceKit/src/Util/NSDate+OWS.h +++ b/SignalServiceKit/src/Util/NSDate+OWS.h @@ -24,10 +24,6 @@ NS_ASSUME_NONNULL_BEGIN + (NSDate *)ows_dateWithMillisecondsSince1970:(uint64_t)milliseconds; + (uint64_t)ows_millisecondsSince1970ForDate:(NSDate *)date; -#pragma mark - Debugging - -+ (NSString *)debugTimestamp; - @end NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Util/NSDate+OWS.mm b/SignalServiceKit/src/Util/NSDate+OWS.mm index e857341f8..2d3e9a55d 100644 --- a/SignalServiceKit/src/Util/NSDate+OWS.mm +++ b/SignalServiceKit/src/Util/NSDate+OWS.mm @@ -26,31 +26,6 @@ NS_ASSUME_NONNULL_BEGIN return (uint64_t)(date.timeIntervalSince1970 * 1000); } -#pragma mark - Debugging - -+ (NSDateFormatter *)dateFormatterForDebugTimestamps -{ - static NSDateFormatter *formatter; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - formatter = [NSDateFormatter new]; - [formatter setLocale:[NSLocale currentLocale]]; - [formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"]; - }); - return formatter; -} - -+ (NSString *)debugTimestamp -{ - // We use ows_millisecondTimeStamp for its higher precision. - return [[NSDate ows_dateWithMillisecondsSince1970:[NSDate ows_millisecondTimeStamp]] formattedAsDebugTimestamp]; -} - -- (NSString *)formattedAsDebugTimestamp -{ - return [[NSDate dateFormatterForDebugTimestamps] stringFromDate:self]; -} - @end NS_ASSUME_NONNULL_END diff --git a/SignalShareExtension/ShareViewController.swift b/SignalShareExtension/ShareViewController.swift index e1a2207b2..2a3db816f 100644 --- a/SignalShareExtension/ShareViewController.swift +++ b/SignalShareExtension/ShareViewController.swift @@ -192,6 +192,8 @@ public class ShareViewController: UINavigationController, ShareViewDelegate, SAE Logger.debug("\(self.logTag) \(#function)") + // Note that this does much more than set a flag; + // it will also run all deferred blocks. AppReadiness.setAppIsReady() if TSAccountManager.isRegistered() {