Updated on 2026-08-14
This commit is contained in:
parent
3c8fb7f668
commit
21ef61585b
24 changed files with 1255 additions and 85 deletions
|
|
@ -8,6 +8,15 @@ import com.tangem.wallet.R
|
|||
import timber.log.Timber
|
||||
|
||||
fun FragmentManager.showFragmentAllowingStateLoss(name: String, fragmentProvider: Provider<Fragment>) {
|
||||
if (backStackEntryCount > 0) {
|
||||
val currentFragmentName = getBackStackEntryAt(backStackEntryCount - 1).name
|
||||
|
||||
if (name == currentFragmentName) {
|
||||
Timber.d("Fragment $name is already at the top of the stack")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Timber.d("Showing $name route")
|
||||
|
||||
val isPoppedBack = popBackStackImmediate(name, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue