Skip to content

Commit

Permalink
merge: fix-drn
Browse files Browse the repository at this point in the history
  • Loading branch information
human committed Jan 8, 2025
2 parents f29f529 + 1941c56 commit 7514f39
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions packages/api-proxy/src/platform/api/route/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ const transitionEndCallback = function (callback) {
}

function navigateTo (options = {}) {
<<<<<<< HEAD
if (toPending) {
return
}
toPending = true
=======
// if (toPending) {
// return
// }
// toPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
>>>>>>> 1941c56cb5f08268746e6235fa4330d6b99577a9
const navigationHelper = global.__navigationHelper
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
if (navigation && navigationHelper) {
Expand All @@ -74,10 +82,17 @@ function navigateTo (options = {}) {
}
}
function redirectTo (options = {}) {
<<<<<<< HEAD
if (redirectPending) {
return
}
redirectPending = true
=======
// if (redirectPending) {
// return
// }
// redirectPending = true
>>>>>>> 1941c56cb5f08268746e6235fa4330d6b99577a9
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
if (navigation && navigationHelper) {
Expand All @@ -99,19 +114,23 @@ function redirectTo (options = {}) {
})
}
}
<<<<<<< HEAD
=======
// let backPending = false
>>>>>>> 1941c56cb5f08268746e6235fa4330d6b99577a9
function navigateBack (options = {}) {
if (backPending) {
return
}
backPending = true
// if (backPending) {
// return
// }
// backPending = true
const navigation = Object.values(global.__mpxPagesMap || {})[0]?.[1]
const navigationHelper = global.__navigationHelper
if (navigation && navigationHelper) {
const delta = options.delta || 1
const routeLength = navigation.getState().routes.length
if (delta >= routeLength && global.__mpx?.config.rnConfig.onAppBack?.(delta - routeLength + 1)) {
nextTick(() => {
backPending = false
// backPending = false
const res = { errMsg: 'navigateBack:ok' }
successHandle(res, options.success, options.complete)
})
Expand Down

0 comments on commit 7514f39

Please sign in to comment.