Log counts to determine when SignalAccount cache goes missing

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent f272c9088f
commit 6f7cae691c

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

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

Loading…
Cancel
Save