Skip to content

Commit

Permalink
Rename setter
Browse files Browse the repository at this point in the history
  • Loading branch information
123mpozzi committed Nov 22, 2024
1 parent 6ccf48a commit d1b0ed2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DebugModule(context: ReactApplicationContext) : BitmovinBaseModule(context
* @param enabled Whether to set verbose logging as enabled or disabled.
*/
@ReactMethod
fun setLoggingEnabled(enabled: Boolean, promise: Promise) {
fun setDebugLoggingEnabled(enabled: Boolean, promise: Promise) {
promise.unit.resolveOnUiThread {
DebugConfig.isLoggingEnabled = enabled
}
Expand Down
2 changes: 1 addition & 1 deletion ios/DebugModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

@interface RCT_EXTERN_REMAP_MODULE(DebugModule, DebugModule, NSObject)

RCT_EXTERN_METHOD(setLoggingEnabled:(nonnull BOOL)enabled)
RCT_EXTERN_METHOD(setDebugLoggingEnabled:(nonnull BOOL)enabled)

@end
4 changes: 2 additions & 2 deletions ios/DebugModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class DebugModule: NSObject, RCTBridgeModule {
extension DebugModule {
/// Enable/disable verbose logging for the console logger.
/// - Parameter enabled: Whether to set verbose logging as enabled or disabled.
@objc(setLoggingEnabled:)
func setLoggingEnabled(enabled: Bool) {
@objc(setDebugLoggingEnabled:)
func setDebugLoggingEnabled(enabled: Bool) {
bridge.uiManager.addUIBlock { [weak self] _, _ in
DebugConfig.logging.logger?.level = enabled ? .verbose : .warning
}
Expand Down
2 changes: 1 addition & 1 deletion src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export class DebugConfig {
*/
static async setDebugLoggingEnabled(value: boolean): Promise<void> {
DebugConfig._isDebugEnabled = value;
await DebugModule.setLoggingEnabled(value);
await DebugModule.setDebugLoggingEnabled(value);
}
}

0 comments on commit d1b0ed2

Please sign in to comment.