File tree 2 files changed +28
-8
lines changed
platform/nativescript/runtime/components 2 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,32 @@ export default {
157
157
158
158
// replace the controllers instead of pushing directly
159
159
frame . _ios . controller . setViewControllersAnimated ( newControllers , false )
160
+ } else {
161
+ const frameId = frame . _android . frameId
162
+ frame . _isBack = false
163
+ backstackEntry . frameId = frameId
164
+
165
+ const manager = frame . _getFragmentManager ( )
166
+ const currentEntry = frame . _currentEntry
167
+
168
+ const newFragmentTag = `fragment${ frameId } [-1]`
169
+ const newFragment = frame . createFragment ( backstackEntry , newFragmentTag )
170
+ const animated = false
171
+ const navigationTransition = null
172
+
173
+ const transaction = manager . beginTransaction ( )
174
+ _setAndroidFragmentTransitions (
175
+ animated ,
176
+ navigationTransition ,
177
+ currentEntry ,
178
+ backstackEntry ,
179
+ transaction ,
180
+ frameId
181
+ )
182
+ transaction . remove ( currentEntry . fragment )
183
+ transaction . replace ( frame . containerViewId , newFragment , newFragmentTag )
184
+ transaction . commitAllowingStateLoss ( )
160
185
}
161
- // Note: in the Android platform there is nothing to do, as the
162
- // page is able to change without the need of replacing the last
163
- // navigation entry
164
-
165
- // reset HMR checking flag
166
186
resetHMRChecking ( )
167
187
} ,
168
188
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export default {
51
51
52
52
mounted ( ) {
53
53
if ( ! this . $templates ) {
54
- return
54
+ return ;
55
55
}
56
56
57
57
this . $refs . listView . setAttribute (
@@ -69,9 +69,9 @@ export default {
69
69
} ,
70
70
onItemLoading ( args ) {
71
71
if ( ! this . $templates ) {
72
- return
72
+ return ;
73
73
}
74
-
74
+
75
75
const index = args . index
76
76
const items = args . object . items
77
77
You can’t perform that action at this time.
0 commit comments