Skip to content

Commit 9c77fa2

Browse files
committed
fix(admob): import
closes: #140
1 parent 0e00cdc commit 9c77fa2

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

apps/demo/src/plugin-demos/firebase-firestore.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Observable, EventData, Page } from '@nativescript/core';
22
import { DemoSharedFirebaseFirestore } from '@demo/shared';
3-
import { Firestore, GeoPoint, Timestamp } from '@nativescript/firebase-firestore';
3+
import { FieldPath, FieldValue, Firestore, GeoPoint, Timestamp } from '@nativescript/firebase-firestore';
44
import { firebase } from '@nativescript/firebase-core';
55

66
export function navigatingTo(args: EventData) {
@@ -14,8 +14,9 @@ export class DemoModel extends DemoSharedFirebaseFirestore {
1414
}
1515

1616
testIt(): void {
17-
this.issue_51();
18-
Promise.all([this.init(), this.invalid_field_path()]);
17+
this.issue_139();
18+
//this.issue_51();
19+
//Promise.all([this.init(), this.invalid_field_path(), this.issue_139(), this.field_path()]);
1920
}
2021

2122
issue_51() {
@@ -125,4 +126,28 @@ export class DemoModel extends DemoSharedFirebaseFirestore {
125126
console.log('error', error);
126127
}
127128
}
129+
130+
async issue_139() {
131+
const data = {
132+
a: {
133+
b: FieldValue.serverTimestamp(),
134+
},
135+
};
136+
137+
data[new FieldPath(['test', '123']) as any] = 'thing';
138+
firebase()
139+
.firestore()
140+
.doc('test/1234')
141+
.update(data)
142+
.then((done) => {
143+
console.log('done', 'issue 139');
144+
})
145+
.catch((e) => {
146+
console.error('done', 'issue 139', e);
147+
});
148+
}
149+
150+
async field_path() {
151+
const fp = new FieldPath(['test', '123']);
152+
}
128153
}

packages/firebase-admob/nativead/index.android.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { FirebaseError } from '@nativescript/firebase-core';
33
import { ManagerRequestOptions, RequestOptions, AdEventListener } from '..';
44
import { AdEventType } from '../common';
55
import { NativeAdEventListener, NativeAdViewBase, MediaViewBase, mediaContentProperty, stretchProperty } from './common';
6-
import { IMediaContent, IMuteThisAdReason, INativeAd, INativeAdImage, IVideoController, NativeAdOptions, UnconfirmedClickListener, VideoStatus, AdChoicesPlacement, MediaAspectRatio, INativeAdLoader, NativeAdEventType } from '.';
7-
8-
export { VideoStatus, AdEventType, AdChoicesPlacement, MediaAspectRatio, NativeAdEventType };
6+
import { IMediaContent, IMuteThisAdReason, INativeAd, INativeAdImage, IVideoController, NativeAdOptions, UnconfirmedClickListener, VideoStatus, INativeAdLoader, NativeAdEventType } from '.';
97

108
const NATIVE_AD_LOADED_EVENT = 'adNativeAdLoaded';
119
const AD_MANAGER_AD_VIEW_LOADED_EVENT = 'adManagerAdViewLoaded';

packages/firebase-admob/nativead/index.ios.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ManagerRequestOptions, RequestOptions, AdEventListener } from '..';
66
import { NativeAdEventListener, NativeAdViewBase, MediaViewBase, mediaContentProperty, stretchProperty } from './common';
77
import { IMediaContent, IMuteThisAdReason, INativeAd, INativeAdImage, IVideoController, NativeAdOptions, UnconfirmedClickListener, VideoStatus, AdChoicesPlacement, MediaAspectRatio, INativeAdLoader, NativeAdEventType } from '.';
88

9-
export { VideoStatus, AdEventType, AdChoicesPlacement, MediaAspectRatio, NativeAdEventType };
109
declare const AdLoaderAdType;
1110

1211
export class NativeAdView extends NativeAdViewBase implements AddChildFromBuilder {

0 commit comments

Comments
 (0)