Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 085f45f

Browse files
cleanup
1 parent dc2c6cb commit 085f45f

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

demo-ng/app/tabs/firestore/firestore.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export class FirestoreComponent {
5959
.set({
6060
name: "Woofie",
6161
last: "lastofwoofie",
62+
lastKnownLocation: firebase.firestore().GeoPoint(5.34, 6.67),
63+
lastKnownLocation2: firestore.GeoPoint(5.34, 6.67)
6264
// note that this only works on iOS (there's a limitation in the Firestore Android SDK)
6365
// updateTsSet: firebase.firestore().FieldValue().serverTimestamp()
6466
},
@@ -143,7 +145,8 @@ export class FirestoreComponent {
143145
city: sfDocRef,
144146
updateTs: firestore.FieldValue.serverTimestamp(),
145147
updateTsAlt: firebase.firestore().FieldValue().serverTimestamp(),
146-
lastKnownLocation: firebase.firestore().GeoPoint(4.34, 5.67)
148+
lastKnownLocation: firebase.firestore().GeoPoint(4.34, 5.67),
149+
lastKnownLocation2: firestore.GeoPoint(4.34, 5.67)
147150
})
148151
.then(() => console.log("Woofie updated"))
149152
.catch(err => console.log("Updating Woofie failed, error: " + JSON.stringify(err)));

src/firebase-common.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export class FieldValue {
1111
constructor(public type: firestore.FieldValueType, public value: any) {
1212
};
1313

14-
serverTimestamp = () => "SERVER_TIMESTAMP";
15-
arrayUnion = (fields: Array<any>) => new FieldValue("ARRAY_UNION", fields);
16-
arrayRemove = (fields: Array<any>) => new FieldValue("ARRAY_REMOVE", fields);
14+
static serverTimestamp = () => "SERVER_TIMESTAMP";
15+
static arrayUnion = (fields: Array<any>) => new FieldValue("ARRAY_UNION", fields);
16+
static arrayRemove = (fields: Array<any>) => new FieldValue("ARRAY_REMOVE", fields);
1717
}
1818

1919
export class GeoPoint {

src/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "7.1.2",
3+
"version": "7.1.3",
44
"description": "Fire. Base. Firebase!",
55
"main": "firebase",
66
"typings": "index.d.ts",
@@ -61,7 +61,7 @@
6161
"ci.tslint": "npm run tslint && npm run tslint.demo",
6262
"development.setup": "npm run setup && npm link && cd ../demo && npm link nativescript-plugin-firebase && cd ../src",
6363
"generate.typings.ios": "cd ../demo-ng && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo-ng/typings!'",
64-
"generate.typings.android": "echo '##### Download the latest relevant .aar file from https://mvnrepository.com/artifact/com.google.firebase, rename .aar to .zip and extract it. Then move classes.jar to the plugin /src folder' && java -jar ../../android-dts-generator/dts-generator/build/libs/dts-generator.jar -input ./classes.jar -output platforms/android/typings/$npm_package_config_typings && rimraf classes.jar && echo '##### Done! Deleted src/classes.jar and generated typings in src/platforms/android/typings/'",
64+
"generate.typings.android": "echo '##### Download the latest relevant .aar file from https://mvnrepository.com/artifact/com.google.firebase, rename .aar to .zip and extract it. Then move classes.jar to the plugin /src folder' && java -jar ../../android-dts-generator/dts-generator/build/libs/dts-generator.jar -input ./classes.jar -output platforms/android/typings/$npm_package_config_typings && rimraf classes.jar && echo '##### Done! Deleted src/classes.jar, and generated typings in src/platforms/android/typings/'",
6565
"generate.typings.android.analytics": "npm run generate.typings.android --nativescript-plugin-firebase:typings=analytics-impl",
6666
"generate.typings.android.auth": "npm run generate.typings.android --nativescript-plugin-firebase:typings=auth",
6767
"generate.typings.android.core": "npm run generate.typings.android --nativescript-plugin-firebase:typings=core",

0 commit comments

Comments
 (0)