Skip to content

Commit

Permalink
android: simplify session replay configuration (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustyniak authored Nov 8, 2024
1 parent 904c18d commit 46beb39
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import android.content.Context
import androidx.startup.Initializer

/**
* Allows Bitdrift to be initialized with the host ApplicationContext instance
* Allows Capture SDK to be initialized with the host ApplicationContext instance
*/
class ContextHolder : Initializer<ContextHolder> {
override fun create(context: Context): ContextHolder {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
package io.bitdrift.capture.replay

/**
* A configuration used to configure Bitdrift session replay feature.
* @param replayMapperConfiguration Map used to matching third party Android views to Bitdrift view types.
* A configuration used to configure bitdrift session replay feature.
*
* @param categorizers Map used to matching third party Android views to bitdrift view types.
*/
data class SessionReplayConfiguration @JvmOverloads constructor(
val replayMapperConfiguration: ReplayMapperConfiguration? = null,
val categorizers: Map<ReplayType, List<String>>? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import io.bitdrift.capture.replay.ReplayType

internal class ViewMapperConfiguration(
private val externalMapper: Map<ReplayType, List<String>>? =
ReplayModule.replayDependencies.sessionReplayConfiguration.replayMapperConfiguration?.customMapper,
ReplayModule.replayDependencies.sessionReplayConfiguration.categorizers,
) {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ public struct SessionReplayConfiguration {

/// Initializes a new session replay configuration.
///
/// - parameter categorizers: A mapping that provides additional instructions on how views implemented
/// with specific class names should be represented in session replay
/// capture visualizations.
/// - parameter categorizers: Map used to match third-party views to bitdrift session replay view types.
public init(categorizers: [String: AnnotatedView] = [:]) {
self.categorizers = categorizers
}
Expand Down

0 comments on commit 46beb39

Please sign in to comment.