move ContactsManager to local dependency

This commit is contained in:
Michael Kirk 2019-01-30 15:43:40 -07:00
parent fe84275cce
commit c2aee429b1
5 changed files with 7 additions and 7 deletions

View File

@ -153,6 +153,10 @@ public class NotificationPresenter: NSObject, NotificationsProtocol {
// MARK: - Dependencies
var contactsManager: OWSContactsManager {
return Environment.shared.contactsManager
}
var identityManager: OWSIdentityManager {
return OWSIdentityManager.shared()
}
@ -332,8 +336,7 @@ public class NotificationPresenter: NSObject, NotificationsProtocol {
}
}
// MJK TODO DI contactsManager
public func notifyUser(for incomingMessage: TSIncomingMessage, in thread: TSThread, contactsManager: ContactsManagerProtocol, transaction: YapDatabaseReadTransaction) {
public func notifyUser(for incomingMessage: TSIncomingMessage, in thread: TSThread, transaction: YapDatabaseReadTransaction) {
guard !thread.isMuted else {
return

View File

@ -170,7 +170,6 @@ class DebugUINotifications: DebugUIPage {
self.notificationPresenter.notifyUser(for: incomingMessage,
in: thread,
contactsManager: self.contactsManager,
transaction: transaction)
}
}

View File

@ -1490,7 +1490,6 @@ NS_ASSUME_NONNULL_BEGIN
[SSKEnvironment.shared.notificationsManager notifyUserForIncomingMessage:incomingMessage
inThread:thread
contactsManager:self.contactsManager
transaction:transaction];
dispatch_async(dispatch_get_main_queue(), ^{

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)notifyUserForIncomingMessage:(TSIncomingMessage *)incomingMessage
inThread:(TSThread *)thread
contactsManager:(id<ContactsManagerProtocol>)contactsManager
transaction:(YapDatabaseReadTransaction *)transaction;
- (void)notifyUserForErrorMessage:(TSErrorMessage *)error

View File

@ -5,7 +5,7 @@
@objc
public class NoopNotificationsManager: NSObject, NotificationsProtocol {
public func notifyUser(for incomingMessage: TSIncomingMessage, in thread: TSThread, contactsManager: ContactsManagerProtocol, transaction: YapDatabaseReadTransaction) {
public func notifyUser(for incomingMessage: TSIncomingMessage, in thread: TSThread, transaction: YapDatabaseReadTransaction) {
owsFailDebug("")
}