diff --git a/Signal/src/ViewControllers/HomeViewController.m b/Signal/src/ViewControllers/HomeViewController.m index 69cfc85b2..9ae85caab 100644 --- a/Signal/src/ViewControllers/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeViewController.m @@ -137,11 +137,11 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState }; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(yapDatabaseModified:) name:YapDatabaseModifiedNotification - object:TSStorageManager.sharedManager.dbNotificationObject]; + object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(yapDatabaseModifiedExternally:) name:YapDatabaseModifiedExternallyNotification - object:TSStorageManager.sharedManager.dbNotificationObject]; + object:nil]; } - (void)dealloc diff --git a/SignalServiceKit/src/Storage/TSStorageManager.m b/SignalServiceKit/src/Storage/TSStorageManager.m index edc20851a..1b230c54e 100644 --- a/SignalServiceKit/src/Storage/TSStorageManager.m +++ b/SignalServiceKit/src/Storage/TSStorageManager.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// Copyright (c) 2018 Open Whisper Systems. All rights reserved. // #import "TSStorageManager.h" @@ -127,12 +127,12 @@ NSString *const TSStorageManagerExceptionName_CouldNotCreateDatabaseDirectory { // The old database location was in the Document directory, // so protect the database files individually. - [OWSFileSystem protectFolderAtPath:self.legacyDatabaseFilePath]; - [OWSFileSystem protectFolderAtPath:self.legacyDatabaseFilePath_SHM]; - [OWSFileSystem protectFolderAtPath:self.legacyDatabaseFilePath_WAL]; + [OWSFileSystem protectFileOrFolderAtPath:self.legacyDatabaseFilePath]; + [OWSFileSystem protectFileOrFolderAtPath:self.legacyDatabaseFilePath_SHM]; + [OWSFileSystem protectFileOrFolderAtPath:self.legacyDatabaseFilePath_WAL]; // Protect the entire new database directory. - [OWSFileSystem protectFolderAtPath:self.sharedDataDatabaseDirPath]; + [OWSFileSystem protectFileOrFolderAtPath:self.sharedDataDatabaseDirPath]; } - (BOOL)userSetPassword { diff --git a/SignalServiceKit/src/Util/OWSDispatch.m b/SignalServiceKit/src/Util/OWSDispatch.m index 3448872c0..0196fa61e 100644 --- a/SignalServiceKit/src/Util/OWSDispatch.m +++ b/SignalServiceKit/src/Util/OWSDispatch.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// Copyright (c) 2018 Open Whisper Systems. All rights reserved. // #import "OWSDispatch.h" @@ -40,8 +40,4 @@ NS_ASSUME_NONNULL_BEGIN @end -void AssertIsOnMainThread() { - OWSCAssert([NSThread isMainThread]); -} - NS_ASSUME_NONNULL_END diff --git a/SignalShareExtension/utils/ShareAppExtensionContext.m b/SignalShareExtension/utils/ShareAppExtensionContext.m index 7de1200a2..f0c52b946 100644 --- a/SignalShareExtension/utils/ShareAppExtensionContext.m +++ b/SignalShareExtension/utils/ShareAppExtensionContext.m @@ -4,6 +4,7 @@ #import "ShareAppExtensionContext.h" #import +#import NS_ASSUME_NONNULL_BEGIN @@ -91,9 +92,6 @@ NS_ASSUME_NONNULL_BEGIN DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); - // We want to prod OWSStorage here so that all storage is valid. - [OWSStorage applicationWillEnterForeground]; - [NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationWillEnterForegroundNotification object:nil]; }