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
795 changes: 7 additions & 788 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ class AccountsSDKModule(reactContext: ReactApplicationContext) : NativeAccountsS
reactContext.addActivityEventListener(loginActivityEventListener)
}

override fun notifyConfigurationRefreshed() {
// Android doesn't have the same native view lifecycle issue as iOS
// The view reconfigures automatically on RN unmountOnBlur approaches
}

override fun login(promise: Promise) {
val loginStartedParams: WritableMap = Arguments.createMap().apply {
putString("accountsSdkLoginStarted", "accountsSdkLoginStarted")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import kotlinx.coroutines.launch
class TicketsSdkView(context: Context) : FrameLayout(context) {

private var offsetTop: Int = 0
private var deepLinkId: String? = null
private var lastAuthState: Boolean? = null // null = not checked yet, true = logged in, false = logged out

// Main thread scope for UI operations (fragment transactions, view updates)
Expand All @@ -62,6 +63,10 @@ class TicketsSdkView(context: Context) : FrameLayout(context) {
this.offsetTopAndBottom(offsetTop)
}

fun setDeepLinkId(id: String?) {
deepLinkId = id
}

private fun isViewAttached(): Boolean {
return isAttachedToWindow
}
Expand Down Expand Up @@ -218,9 +223,8 @@ class TicketsSdkView(context: Context) : FrameLayout(context) {
.commitAllowingStateLoss()
}

if (Config.get("orderIdDeepLink").isNotBlank()) {
TicketsSDKSingleton.jumpToOrderOrEvent(context, Config.get("orderIdDeepLink"))
Config.set("orderIdDeepLink", "")
if (!deepLinkId.isNullOrBlank()) {
TicketsSDKSingleton.jumpToOrderOrEvent(context, deepLinkId!!)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class TicketsSdkViewManager :
view.setOffsetTop(value.toInt())
}

@ReactProp(name = "deepLinkId")
override fun setDeepLinkId(view: TicketsSdkView, value: String?) {
view.setDeepLinkId(value)
}

companion object {
const val NAME = "TicketsSdkEmbeddedView"
}
Expand Down
40 changes: 40 additions & 0 deletions android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@
<string name="app_tm_modern_accounts_scheme_8"></string>
<string name="app_tm_modern_accounts_scheme_9"></string>
<string name="app_tm_modern_accounts_scheme_10"></string>
<string name="app_tm_modern_accounts_scheme_11"></string>
<string name="app_tm_modern_accounts_scheme_12"></string>
<string name="app_tm_modern_accounts_scheme_13"></string>
<string name="app_tm_modern_accounts_scheme_14"></string>
<string name="app_tm_modern_accounts_scheme_15"></string>
<string name="app_tm_modern_accounts_scheme_16"></string>
<string name="app_tm_modern_accounts_scheme_17"></string>
<string name="app_tm_modern_accounts_scheme_18"></string>
<string name="app_tm_modern_accounts_scheme_19"></string>
<string name="app_tm_modern_accounts_scheme_20"></string>
<string name="app_tm_modern_accounts_scheme_21"></string>
<string name="app_tm_modern_accounts_scheme_22"></string>
<string name="app_tm_modern_accounts_scheme_23"></string>
<string name="app_tm_modern_accounts_scheme_24"></string>
<string name="app_tm_modern_accounts_scheme_25"></string>
<string name="app_tm_modern_accounts_scheme_26"></string>
<string name="app_tm_modern_accounts_scheme_27"></string>
<string name="app_tm_modern_accounts_scheme_28"></string>
<string name="app_tm_modern_accounts_scheme_29"></string>
<string name="app_tm_modern_accounts_scheme_30"></string>
<string name="app_tm_sportxr_scheme"></string>
<string name="app_tm_sportxr_scheme_2"></string>
<string name="app_tm_sportxr_scheme_3"></string>
Expand All @@ -20,4 +40,24 @@
<string name="app_tm_sportxr_scheme_8"></string>
<string name="app_tm_sportxr_scheme_9"></string>
<string name="app_tm_sportxr_scheme_10"></string>
<string name="app_tm_sportxr_scheme_11"></string>
<string name="app_tm_sportxr_scheme_12"></string>
<string name="app_tm_sportxr_scheme_13"></string>
<string name="app_tm_sportxr_scheme_14"></string>
<string name="app_tm_sportxr_scheme_15"></string>
<string name="app_tm_sportxr_scheme_16"></string>
<string name="app_tm_sportxr_scheme_17"></string>
<string name="app_tm_sportxr_scheme_18"></string>
<string name="app_tm_sportxr_scheme_19"></string>
<string name="app_tm_sportxr_scheme_20"></string>
<string name="app_tm_sportxr_scheme_21"></string>
<string name="app_tm_sportxr_scheme_22"></string>
<string name="app_tm_sportxr_scheme_23"></string>
<string name="app_tm_sportxr_scheme_24"></string>
<string name="app_tm_sportxr_scheme_25"></string>
<string name="app_tm_sportxr_scheme_26"></string>
<string name="app_tm_sportxr_scheme_27"></string>
<string name="app_tm_sportxr_scheme_28"></string>
<string name="app_tm_sportxr_scheme_29"></string>
<string name="app_tm_sportxr_scheme_30"></string>
</resources>
Loading
Loading