Skip to content

Commit 8cc95c9

Browse files
committed
Trigger transaction listener when restoring tab from bundle
`FragNavController.restoreFromBundle` attempts to re-select the previously selected tab when restoring its state from a `Bundle`, but was not notifying the `TransactionListener` (if one was set).
1 parent 40de99a commit 8cc95c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frag-nav/src/main/java/com/ncapdevi/fragnav/FragNavController.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@ class FragNavController constructor(private val fragmentManger: FragmentManager,
839839
// We cannot use switchTab, because switchTab removes fragment, but we don't want it
840840
currentStackIndex = selectedTabIndex
841841
fragNavTabHistoryController.switchTab(selectedTabIndex)
842+
843+
transactionListener?.onTabTransaction(mCurrentFrag, selectedTabIndex)
842844
}
843845

844846
//Successfully restored state

0 commit comments

Comments
 (0)