Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/Superwall-Android/releases) on GitHub.


## 2.6.9

## Deprecations
- Deprecated `paywallWebviewLoad_timeout` - this event was causing confusion due to it's naming, leading to it being deprecated

## 2.6.8

### Enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,6 @@ sealed class InternalSuperwallEvent(

object Fallback : State()

class Timeout(
val msg: String,
) : State()

class Complete : State()
}

Expand All @@ -727,11 +723,6 @@ sealed class InternalSuperwallEvent(
paywallInfo,
)

is PaywallWebviewLoad.State.Timeout ->
SuperwallEvent.PaywallWebviewLoadTimeout(
paywallInfo,
)

is PaywallWebviewLoad.State.Fail ->
SuperwallEvent.PaywallWebviewLoadFail(
paywallInfo,
Expand Down Expand Up @@ -765,11 +756,6 @@ sealed class InternalSuperwallEvent(
}.toTypedArray(),
)

is State.Timeout ->
mapOf(
"error_message" to state.msg,
)

else -> mapOf()
}
val params = paywallInfo.eventParams() + extras
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ sealed class SuperwallEvent {
get() = "paywallWebviewLoad_complete"
}

// / When the loading of a paywall's website times out.
@Deprecated("Due to confusion this event was causing we're deprecating it's usage")
data class PaywallWebviewLoadTimeout(
val paywallInfo: PaywallInfo,
) : SuperwallEvent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ enum class SuperwallEvents(
PaywallWebviewLoadStart("paywallWebviewLoad_start"),
PaywallWebviewLoadFail("paywallWebviewLoad_fail"),
PaywallWebviewLoadComplete("paywallWebviewLoad_complete"),

@Deprecated("Due to confusion this event was causing we're deprecating it's usage")
PaywallWebviewLoadTimeout("paywallWebviewLoad_timeout"),
PaywallWebviewLoadFallback("paywallWebviewLoad_fallback"),
PaywallResourceLoadFail("paywallResourceLoad_fail"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,30 +436,6 @@ class TrackingLogicTest {
}
}

@Test
fun `isNotDisabledVerboseEvent allows PaywallWebviewLoad Timeout even when verbose events disabled`() =
Given("PaywallWebviewLoad with Timeout state and verbose events disabled") {
val paywallInfo = PaywallInfo.empty()
val event =
InternalSuperwallEvent.PaywallWebviewLoad(
state = InternalSuperwallEvent.PaywallWebviewLoad.State.Timeout("timeout"),
paywallInfo = paywallInfo,
)

When("checking if event is not disabled verbose event") {
val result =
TrackingLogic.isNotDisabledVerboseEvent(
event,
disableVerboseEvents = true,
isSandbox = false,
)

Then("it should return true because Timeout events are always allowed") {
assertTrue(result)
}
}
}

// ========== canTriggerPaywall Tests ==========

@Test
Expand Down
Loading