Skip to content

Commit

Permalink
Renamed a couple of things
Browse files Browse the repository at this point in the history
  • Loading branch information
asendra committed Oct 17, 2024
1 parent 5d51e08 commit a1a7ca5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Sources/Player/Common/Event/NotificationsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ final class NotificationsHandler {

func offliningProgress(for mediaProduct: MediaProduct, is downloadPercentage: Double) {
queue.async {
self.offlineEngineListener?.offliningProgress(for: mediaProduct, is: downloadPercentage)
self.offlineEngineListener?.offliningProgressed(for: mediaProduct, is: downloadPercentage)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
public final class OfflineEngineListenerMock: OfflineEngineListener {
public func offliningStarted(for mediaProduct: MediaProduct) {}

public func offliningProgress(for mediaProduct: MediaProduct, is downloadPercentage: Double) {}
public func offliningProgressed(for mediaProduct: MediaProduct, is downloadPercentage: Double) {}

public func offliningCompleted(for mediaProduct: MediaProduct) {}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Player/OfflineEngine/OfflineEngineListener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

public protocol OfflineEngineListener: AnyObject {
func offliningStarted(for mediaProduct: MediaProduct)
func offliningProgress(for mediaProduct: MediaProduct, is downloadPercentage: Double)
func offliningProgressed(for mediaProduct: MediaProduct, is downloadPercentage: Double)
func offliningCompleted(for mediaProduct: MediaProduct)
func offliningFailed(for mediaProduct: MediaProduct)
func offlinedDeleted(for mediaProduct: MediaProduct)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Player/Player.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public extension Player {
/// logging is actually performed.
/// - Returns: Instance of Player if not initialized yet, or nil if initized already.
static func bootstrap(
listener: PlayerListener,
playerListener: PlayerListener,
offlineEngineListener: OfflineEngineListener? = nil,
listenerQueue: DispatchQueue = .main,
featureFlagProvider: FeatureFlagProvider = .standard,
Expand Down Expand Up @@ -170,7 +170,7 @@ public extension Player {

let networkMonitor = NetworkMonitor()
let notificationsHandler = NotificationsHandler(
listener: listener,
listener: playerListener,
offlineEngineListener: offlineEngineListener,
queue: listenerQueue
)
Expand Down
2 changes: 1 addition & 1 deletion TestApps/Player/PlayerTestApp/PlayerViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final class PlayerViewModel: ObservableObject {

private func initPlayer() {
player = Player.bootstrap(
listener: self,
playerListener: self,
credentialsProvider: auth,
eventSender: eventSender
)
Expand Down
6 changes: 3 additions & 3 deletions Tests/PlayerTests/FeatureFlagProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class FeatureFlagProviderTests: XCTestCase {
shouldUseOfflineEngine = false

let playerInstance = Player.bootstrap(
listener: PlayerListenerMock(),
playerListener: PlayerListenerMock(),
offlineEngineListener: OfflineEngineListenerMock(),
listenerQueue: DispatchQueue(label: "com.tidal.queue.for.testing"),
featureFlagProvider: featureFlagProvider,
Expand All @@ -38,7 +38,7 @@ final class FeatureFlagProviderTests: XCTestCase {
shouldUseOfflineEngine = true

let playerInstance = Player.bootstrap(
listener: PlayerListenerMock(),
playerListener: PlayerListenerMock(),
offlineEngineListener: OfflineEngineListenerMock(),
listenerQueue: DispatchQueue(label: "com.tidal.queue.for.testing"),
featureFlagProvider: featureFlagProvider,
Expand All @@ -56,7 +56,7 @@ final class FeatureFlagProviderTests: XCTestCase {
shouldUseOfflineEngine = false

let playerInstance = Player.bootstrap(
listener: PlayerListenerMock(),
playerListener: PlayerListenerMock(),
offlineEngineListener: OfflineEngineListenerMock(),
listenerQueue: DispatchQueue(label: "com.tidal.queue.for.testing"),
featureFlagProvider: featureFlagProvider,
Expand Down

0 comments on commit a1a7ca5

Please sign in to comment.