Skip to content

Commit e96864b

Browse files
committed
chore: update demo
1 parent 693ff08 commit e96864b

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class DemoModel extends DemoSharedFirebaseAdmob {
4444
const view = event.object;
4545
const loader = new NativeAdLoader('ca-app-pub-3940256099942544/3986624511', null, {
4646
nativeAdOptions: {
47-
adChoicesPlacement: AdChoicesPlacement.TOP_RIGHT,
47+
adChoicesPlacement: AdChoicesPlacement.BOTTOM_LEFT,
4848
},
4949
});
5050
loader.onAdEvent((event, error, data) => {
@@ -58,7 +58,6 @@ export class DemoModel extends DemoSharedFirebaseAdmob {
5858
const bv = view.getViewById('bodyView');
5959
bv.text = ad.body;
6060
const iv = view.getViewById('iconView');
61-
console.log(ad.icon);
6261
iv.src = ad.icon.image;
6362
view.nativeAd = ad;
6463
console.log('nativead loaded');

apps/demo/src/plugin-demos/firebase-admob.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ xmlns:ui="@nativescript/firebase-admob"
55
<ActionBar title="firebase-admob" icon="" class="action-bar">
66
</ActionBar>
77
</Page.actionBar>
8-
<StackLayout class="p-20">
8+
<StackLayout class="p-x-20">
99
<ui:BannerAd height="100" width="100" unitId="{{bannerAdUnit}}" layoutChanged="{{bannerLoaded}}"/>
10-
<!-- <ui:NativeAdView height="400" loaded="{{nativeAdLoaded}}" layoutChanged="{{nativeAdLayoutChanged}}">
11-
<GridLayout rows="auto,auto,auto,auto" height="300" width="300">
12-
<Label id="headLineView" text="First"/>
13-
<ui:MediaView row="1" id="mediaView" height="100%"/>
14-
<Label row="2" id="bodyView"/>
15-
<Image id="iconView" row="3"/>
10+
<!-- <ui:NativeAdView height="500" loaded="{{nativeAdLoaded}}" layoutChanged="{{nativeAdLayoutChanged}}">
11+
<GridLayout iosOverflowSafeAreaEnabled="false" rows="auto,auto,auto,auto,auto" columns="auto,auto" height="300" width="100%">
12+
<GridLayout>
13+
<Label id="attr" text="Ad" backgroundColor="orange" color="white" fontSize="15" fontWeight="600" padding="2"/>
14+
</GridLayout>
15+
<Label id="headLineView" text="First" row="1" colSpan="2"/>
16+
<ui:MediaView row="2" id="mediaView" height="100%" colSpan="2"/>
17+
<Label row="3" id="bodyView" colSpan="2"/>
18+
<Image id="iconView" row="4" colSpan="2"/>
1619
</GridLayout>
1720
</ui:NativeAdView> -->
1821
</StackLayout>

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ export class DemoModel extends DemoSharedFirebaseFirestore {
1515

1616
testIt(): void {
1717
this.issue_139();
18-
//this.issue_51();
18+
this.issue_51();
1919
//Promise.all([this.init(), this.invalid_field_path(), this.issue_139(), this.field_path()]);
2020
}
2121

2222
issue_51() {
2323
const doc = firebase().firestore().collection('users').doc('0Myq8dlF1dQtC7tX4WlA');
2424

25+
const users = firebase().firestore().collection('users');
26+
2527
doc.onSnapshot({
2628
next(snapshot) {
2729
console.log('onSnapshot', 'object');
@@ -44,6 +46,29 @@ export class DemoModel extends DemoSharedFirebaseFirestore {
4446
doc.onSnapshot({ includeMetadataChanges: true }, (doc) => {
4547
console.log('onSnapshot', 'options', '&', 'function');
4648
});
49+
50+
users.onSnapshot({
51+
next(snapshot) {
52+
console.log('users', 'onSnapshot', 'object');
53+
},
54+
});
55+
56+
users.onSnapshot(
57+
{ includeMetadataChanges: true },
58+
{
59+
next(snapshot) {
60+
console.log('users', 'onSnapshot', 'options', '&', 'object');
61+
},
62+
}
63+
);
64+
65+
users.onSnapshot((doc) => {
66+
console.log('users', 'onSnapshot', '&', 'function');
67+
});
68+
69+
users.onSnapshot({ includeMetadataChanges: true }, (doc) => {
70+
console.log('users', 'onSnapshot', 'options', '&', 'function');
71+
});
4772
}
4873

4974
async init() {

0 commit comments

Comments
 (0)