Skip to content

Commit 3577932

Browse files
authored
Merge pull request #32 from halfnelson/fix/native-adapter-1
Native Adapter Fixes
2 parents 5a2a9b0 + 9f2c1fb commit 3577932

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

runtime/svelte-native/patch-page-show-modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// FIXME should we override ViewBase#showModal instead?
2020
// eslint-disable-next-line import/no-unresolved
21-
import { Page } from 'tns-core-modules/ui/page'
21+
import { Page } from '@nativescript/core'
2222

2323
const prop =
2424
typeof Symbol !== 'undefined'

runtime/svelte-native/proxy-adapter-native.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/* global document */
22

3-
// eslint-disable-next-line import/no-unresolved
4-
import { NavigationType } from 'tns-core-modules/ui/frame'
5-
63
import { adapter as ProxyAdapterDom } from '../proxy-adapter-dom'
74

85
import { patchShowModal, getModalData } from './patch-page-show-modal'
@@ -94,13 +91,13 @@ const replacePage = (frame, newPageElement) => {
9491
const navigationContext = {
9592
entry: newBackstackEntry,
9693
isBackNavigation: false,
97-
navigationType: NavigationType.replace,
94+
navigationType: 2 /* NavigationType replace */,
9895
}
9996
frame._navigationQueue.push(navigationContext)
10097
frame._processNextNavigationEntry()
10198
}
10299

103-
export default class ProxyAdapterNative extends ProxyAdapterDom {
100+
export const adapter = class ProxyAdapterNative extends ProxyAdapterDom {
104101
constructor(instance) {
105102
super(instance)
106103

@@ -336,4 +333,4 @@ export default class ProxyAdapterNative extends ProxyAdapterDom {
336333
// is more informative
337334
throw err
338335
}
339-
}
336+
}

0 commit comments

Comments
 (0)