move ContactsManager to local dependency
This commit is contained in:
parent
fe84275cce
commit
c2aee429b1
@ -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
|
||||
|
||||
@ -170,7 +170,6 @@ class DebugUINotifications: DebugUIPage {
|
||||
|
||||
self.notificationPresenter.notifyUser(for: incomingMessage,
|
||||
in: thread,
|
||||
contactsManager: self.contactsManager,
|
||||
transaction: transaction)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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(), ^{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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("")
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user