Log counts to determine when SignalAccount cache goes missing

// FREEBIE
This commit is contained in:
Michael Kirk 2017-12-14 11:32:09 -05:00
parent f272c9088f
commit 6f7cae691c
2 changed files with 3 additions and 1 deletions

View File

@ -240,7 +240,8 @@ NSString *const OWSContactsManagerSignalAccountsDidChangeNotification
[self.dbWriteConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
NSArray<NSString *> *allKeys = [transaction allKeysInCollection:[SignalAccount collection]];
NSMutableSet<NSString *> *orphanedKeys = [NSMutableSet setWithArray:allKeys];
DDLogInfo(@"%@ Saving %lu SignalAccounts", self.logTag, signalAccounts.count);
for (SignalAccount *signalAccount in signalAccounts) {
// TODO only save the ones that changed
[orphanedKeys removeObject:signalAccount.uniqueId];

View File

@ -474,6 +474,7 @@ class SystemContactsFetcher: NSObject {
completion(nil)
}
Logger.info("\(self.TAG) fetched \(contacts.count) contacts.")
let contactsHash = HashableArray(contacts).hashValue
DispatchQueue.main.async {