File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/products/details Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,11 @@ class ProductDetailFragment :
156156 override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
157157 super .onViewCreated(view, savedInstanceState)
158158
159- val isTrashEnabled =
159+ val productListInBackstack =
160160 findNavController().previousBackStackEntry?.destination?.id == BottomNavigationPosition .PRODUCTS .id
161+ val isInDetailPane =
162+ requireContext().isTwoPanesShouldBeUsed && (parentFragment?.id == R .id.detail_nav_container)
163+ val isTrashEnabled = productListInBackstack || isInDetailPane
161164 viewModel.setTrashActionPossible(isTrashEnabled)
162165
163166 blazeCampaignCreationDispatcher.attachFragment(this , BlazeFlowSource .PRODUCT_DETAIL_PROMOTE_BUTTON )
You can’t perform that action at this time.
0 commit comments