Clean up ahead of PR.

This commit is contained in:
Matthew Chen 2018-01-29 13:43:37 -05:00
parent ebbe96a5d5
commit 8e427111ef
4 changed files with 4 additions and 29 deletions

View File

@ -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]) {

View File

@ -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

View File

@ -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

View File

@ -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() {