Skip to content

Commit d696d4c

Browse files
committed
fix(android): remove appCachePath as it was removed from android
1 parent c6ac2fc commit d696d4c

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

src/webview/index.android.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
useWideViewPortProperty,
2121
webConsoleProperty
2222
} from './index.common';
23-
import { appCachePathProperty } from '.';
2423

2524
export * from './index.common';
2625

@@ -865,13 +864,6 @@ export class AWebView extends WebViewExtBase {
865864
[builtInZoomControlsProperty.setNative](enabled: boolean) {
866865
this.nativeViewProtected.getSettings().setBuiltInZoomControls(!!enabled);
867866
}
868-
[appCachePathProperty.setNative](pth: string) {
869-
const androidWebView = this.nativeViewProtected;
870-
const settings = androidWebView.getSettings();
871-
settings.setAppCachePath(pth);
872-
settings.setAppCacheEnabled(!!pth);
873-
}
874-
875867
[displayZoomControlsProperty.getDefault]() {
876868
const androidWebView = this.nativeViewProtected;
877869
const settings = androidWebView.getSettings();

src/webview/index.common.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ export const allowsInlineMediaPlaybackProperty = new Property<WebViewExtBase, bo
8282
export const srcProperty = new Property<WebViewExtBase, string>({
8383
name: 'src'
8484
});
85-
export const appCachePathProperty = new Property<WebViewExtBase, string>({
86-
name: 'appCachePath'
87-
});
8885

8986
export const scrollBounceProperty = new Property<WebViewExtBase, boolean>({
9087
name: 'scrollBounce',
@@ -825,7 +822,7 @@ export abstract class WebViewExtBase extends ContainerView {
825822
// Add file:/// prefix for local files.
826823
// They should be loaded with _loadUrl() method as it handles query params.
827824
if (src.startsWith('~/')) {
828-
src = `file://${knownFolders.currentApp().path}/${src.substr(2)}`;
825+
src = `file://${knownFolders.currentApp().path}/${src.substring(2)}`;
829826
if (Trace.isEnabled()) {
830827
Trace.write(`WebViewExt.src = "${originSrc}" startsWith ~/ resolved to "${src}"`, WebViewTraceCategory, Trace.messageType.info);
831828
}
@@ -890,7 +887,7 @@ export abstract class WebViewExtBase extends ContainerView {
890887
}
891888

892889
if (filepath.startsWith('~')) {
893-
filepath = path.normalize(knownFolders.currentApp().path + filepath.substr(1));
890+
filepath = path.normalize(knownFolders.currentApp().path + filepath.substring(1));
894891
}
895892

896893
if (filepath.startsWith('file://')) {
@@ -1453,7 +1450,7 @@ export abstract class WebViewExtBase extends ContainerView {
14531450
*/
14541451
public fixLocalResourceName(resourceName: string) {
14551452
if (resourceName.startsWith(this.interceptScheme)) {
1456-
return resourceName.substr(this.interceptScheme.length + 3);
1453+
return resourceName.substring(this.interceptScheme.length + 3);
14571454
}
14581455

14591456
return resourceName;
@@ -1576,6 +1573,5 @@ viewPortProperty.register(WebViewExtBase);
15761573
isScrollEnabledProperty.register(WebViewExtBase);
15771574
scalesPageToFitProperty.register(WebViewExtBase);
15781575
mediaPlaybackRequiresUserActionProperty.register(WebViewExtBase);
1579-
appCachePathProperty.register(WebViewExtBase);
15801576
limitsNavigationsToAppBoundDomainsProperty.register(WebViewExtBase);
15811577
scrollBarIndicatorVisibleProperty.register(WebViewExtBase);

0 commit comments

Comments
 (0)