From f97fa19650eccd3f94b61dc872d3bcbff6ef2bde Mon Sep 17 00:00:00 2001 From: ankitkumar Date: Sun, 3 Dec 2023 00:12:53 +0530 Subject: [PATCH] reset visible tooltip list before setting new one --- .../java/com/pseudoankit/coachmark/scope/CoachMarkScopeImpl.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coachmark/src/main/java/com/pseudoankit/coachmark/scope/CoachMarkScopeImpl.kt b/coachmark/src/main/java/com/pseudoankit/coachmark/scope/CoachMarkScopeImpl.kt index 27edf5d..4ee63cb 100644 --- a/coachmark/src/main/java/com/pseudoankit/coachmark/scope/CoachMarkScopeImpl.kt +++ b/coachmark/src/main/java/com/pseudoankit/coachmark/scope/CoachMarkScopeImpl.kt @@ -30,6 +30,8 @@ internal class CoachMarkScopeImpl( private var _visibleTooltips = listOf() set(value) { + // resetting all values before setting new ones + field = listOf() _visibleTooltipIndex = 0 updateVisibleItem(value, _visibleTooltipIndex) field = value