Skip to content

Commit

Permalink
Rename remoteMessagePublisher to newTabPageRemoteMessagePublisher in …
Browse files Browse the repository at this point in the history
…NewTabPageActiveRemoteMessageProviding
  • Loading branch information
ayoy committed Jan 2, 2025
1 parent 7d54df2 commit ef287f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import NewTabPage
import RemoteMessaging

extension ActiveRemoteMessageModel: NewTabPageActiveRemoteMessageProviding {
var remoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> {
var newTabPageRemoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> {
$newTabPageRemoteMessage
.dropFirst()
.eraseToAnyPublisher()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import RemoteMessaging

public protocol NewTabPageActiveRemoteMessageProviding {
var newTabPageRemoteMessage: RemoteMessageModel? { get set }
var remoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> { get }
var newTabPageRemoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> { get }

func isMessageSupported(_ message: RemoteMessageModel) -> Bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class NewTabPageRMFClient: NewTabPageScriptClient {
public init(remoteMessageProvider: NewTabPageActiveRemoteMessageProviding) {
self.remoteMessageProvider = remoteMessageProvider

remoteMessageProvider.remoteMessagePublisher
remoteMessageProvider.newTabPageRemoteMessagePublisher
.sink { [weak self] remoteMessage in
self?.notifyRemoteMessageDidChange(remoteMessage)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NewTabPage
final class CapturingNewTabPageActiveRemoteMessageProvider: NewTabPageActiveRemoteMessageProviding {
@Published var newTabPageRemoteMessage: RemoteMessageModel?

var remoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> {
var newTabPageRemoteMessagePublisher: AnyPublisher<RemoteMessageModel?, Never> {
$newTabPageRemoteMessage.dropFirst().eraseToAnyPublisher()
}

Expand Down

0 comments on commit ef287f4

Please sign in to comment.