File tree Expand file tree Collapse file tree
nativescript-core/ui/frame Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,24 +274,9 @@ export class Frame extends FrameBase {
274274 ! this . _currentEntry . fragment . isAdded ( ) ) {
275275 return ;
276276 }
277- const fragmentManager : androidx . fragment . app . FragmentManager = this . _getFragmentManager ( ) ;
277+ const fragment : androidx . fragment . app . Fragment = this . _currentEntry . fragment ;
278+ const fragmentManager : androidx . fragment . app . FragmentManager = fragment . getFragmentManager ( ) ;
278279
279- // Check if manager contains the fragment to be removed
280- // This might happen when a dialog is already closed with android back btn
281- const fragment = this . _currentEntry . fragment ;
282- const fragmentFound = nativeArrayIncludes ( fragmentManager . getFragments ( ) . toArray ( ) , fragment ) ;
283-
284- if ( traceEnabled ( ) ) {
285- const message = fragmentFound ?
286- `Frame.disposeCurrentFragment - fragment(${ fragment } ) found in fragmentManager(${ fragmentManager } ). Removing ...` :
287- `Frame.disposeCurrentFragment - fragment(${ fragment } ) NOT found in fragmentManager(${ fragmentManager } ). Skipping remove` ;
288- traceWrite ( message , traceCategories . NativeLifecycle ) ;
289- }
290-
291- if ( ! fragmentFound ) {
292- return ;
293- }
294-
295280 const transaction = fragmentManager . beginTransaction ( ) ;
296281 const fragmentExitTransition = fragment . getExitTransition ( ) ;
297282
You can’t perform that action at this time.
0 commit comments