Skip to content

Commit 593bf45

Browse files
fix documentation for onBackClickListener of the Inbox Toolbar view
1 parent 8b909b2 commit 593bf45

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/inbox/IterableInboxToolbarView.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ class IterableInboxToolbarView @JvmOverloads constructor(
6969
/**
7070
* Override the default back-click behavior. Honored for
7171
* `InboxToolbarOption.WithBackButton` and for `InboxToolbarOption.Custom` layouts that
72-
* include a view with id `@id/iterable_inbox_back_button`. Pass `null` to clear a
73-
* previously set override and fall back to the host activity's `OnBackPressedDispatcher`.
72+
* include a view with id `@id/iterable_inbox_back_button`.
7473
*
75-
* When this view is hosted by [IterableInboxFragment], the fragment always installs
76-
* a default listener, so this fallback path is only reached for standalone XML usage.
74+
* Hosting via [IterableInboxFragment] wires this for you. For standalone usage,
75+
* pass a listener if the view's `Context` isn't a [ComponentActivity].
7776
*/
7877
fun setOnBackClickListener(listener: OnClickListener?) {
7978
backClickListener = listener

0 commit comments

Comments
 (0)