Skip to content

Commit

Permalink
feat: Rename event datafileFetchError with _datafileFetchError
Browse files Browse the repository at this point in the history
  • Loading branch information
polok committed Nov 9, 2023
1 parent 24ae1dd commit 5a183f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/FeaturevisorSDK/Emitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ public enum EventName {
case refresh
case update
case activation
case datafileFetchError
case _datafileFetchError
}

public typealias Listener = (@escaping (Any...) -> Void) -> Void
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeaturevisorSDK/Instance+Refresh.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extension FeaturevisorInstance {
self.logger.error("failed to refresh datafile", ["error": error])
self.statuses.refreshInProgress = false

self.emitter.emit(.datafileFetchError, error)
self.emitter.emit(._datafileFetchError, error)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/FeaturevisorSDK/Instance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public class FeaturevisorInstance {
}

if let _onDatafileFetchError = options._onDatafileFetchError {
emitter.addListener(.datafileFetchError, _onDatafileFetchError)
emitter.addListener(._datafileFetchError, _onDatafileFetchError)
}

// expose emitter methods
Expand Down Expand Up @@ -248,7 +248,7 @@ public class FeaturevisorInstance {
case .failure(let error):
self?.logger.error("Failed to fetch datafile: \(error)")

self?.emitter.emit(.datafileFetchError, error)
self?.emitter.emit(._datafileFetchError, error)
}
}
}
Expand Down

0 comments on commit 5a183f7

Please sign in to comment.