Updated on 2026-08-14

This commit is contained in:
Tangem 2020-12-09 20:39:18 +03:00
parent 3afa7e8313
commit 19de351c7d

View file

@ -18,13 +18,13 @@ import com.tangem.wallet.R
fun FragmentActivity.openFragment(screen: AppScreen, addToBackStack: Boolean = true) {
val transaction = this.supportFragmentManager.beginTransaction()
.replace(
.add(
R.id.fragment_container,
fragmentFactory(screen),
screen.name
)
if (addToBackStack && screen != AppScreen.Home) transaction.addToBackStack(null)
transaction.commit();
transaction.commitAllowingStateLoss();
}
fun FragmentActivity.popBackTo(screen: AppScreen?, inclusive: Boolean = false) {