Skip to content

Commit

Permalink
fix: fix the bug when a new DefaultTrackingOptions is passed to the C…
Browse files Browse the repository at this point in the history
…onfiguration
  • Loading branch information
PouriaAmini committed Aug 6, 2024
1 parent a381099 commit dec1f4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions android/src/main/java/com/amplitude/android/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ open class Configuration(

// A backing property to store the autocapture options. Any changes to `trackingSessionEvents`
// or the `defaultTracking` options will be reflected in this property.
private var _autocapture: MutableSet<AutocaptureOption> = autocapture.toMutableSet()
private val _autocapture: MutableSet<AutocaptureOption> = autocapture.toMutableSet()

val autocapture: Set<AutocaptureOption> = _autocapture

Expand All @@ -177,6 +177,7 @@ open class Configuration(
var defaultTracking: DefaultTrackingOptions = DefaultTrackingOptions(_autocapture)
set(value) {
field = value
_autocapture = field.autocaptureOptions
_autocapture.clear()
_autocapture.addAll(value.autocaptureOptions)
}
}

0 comments on commit dec1f4c

Please sign in to comment.