File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed
androidMain/kotlin/dev/gitlive/firebase/firestore
commonMain/kotlin/dev/gitlive/firebase/firestore
iosMain/kotlin/dev/gitlive/firebase/firestore
jsMain/kotlin/dev/gitlive/firebase/firestore Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -409,13 +409,18 @@ actual class SnapshotMetadata(val android: com.google.firebase.firestore.Snapsho
409
409
}
410
410
411
411
actual class FieldPath private constructor(val android : com.google.firebase.firestore.FieldPath ) {
412
+
413
+ actual companion object {
414
+ actual val documentId = FieldPath (com.google.firebase.firestore.FieldPath .documentId())
415
+ }
416
+
412
417
actual constructor (vararg fieldNames: String ) : this (
413
418
com.google.firebase.firestore.FieldPath .of(
414
419
* fieldNames
415
420
)
416
421
)
417
422
418
- actual val documentId: FieldPath get() = FieldPath (com.google.firebase.firestore. FieldPath . documentId())
423
+ actual val documentId: FieldPath get() = FieldPath . documentId
419
424
actual val encoded: EncodedFieldPath = android
420
425
override fun equals (other : Any? ): Boolean = other is FieldPath && android == other.android
421
426
override fun hashCode (): Int = android.hashCode()
Original file line number Diff line number Diff line change @@ -544,6 +544,10 @@ expect class SnapshotMetadata {
544
544
}
545
545
546
546
expect class FieldPath (vararg fieldNames : String ) {
547
+ companion object {
548
+ val documentId: FieldPath
549
+ }
550
+ @Deprecated(" Use companion object instead" , replaceWith = ReplaceWith (" FieldPath.documentId" ))
547
551
val documentId: FieldPath
548
552
val encoded: EncodedFieldPath
549
553
}
Original file line number Diff line number Diff line change @@ -436,8 +436,11 @@ actual class SnapshotMetadata(val ios: FIRSnapshotMetadata) {
436
436
}
437
437
438
438
actual class FieldPath private constructor(val ios : FIRFieldPath ) {
439
+ actual companion object {
440
+ actual val documentId = FieldPath (FIRFieldPath .documentID())
441
+ }
439
442
actual constructor (vararg fieldNames: String ) : this (FIRFieldPath (fieldNames.asList()))
440
- actual val documentId: FieldPath get() = FieldPath ( FIRFieldPath .documentID())
443
+ actual val documentId: FieldPath get() = FieldPath .documentId
441
444
actual val encoded: EncodedFieldPath = ios
442
445
override fun equals (other : Any? ): Boolean = other is FieldPath && ios == other.ios
443
446
override fun hashCode (): Int = ios.hashCode()
Original file line number Diff line number Diff line change @@ -438,10 +438,14 @@ actual class SnapshotMetadata(val js: JsSnapshotMetadata) {
438
438
}
439
439
440
440
actual class FieldPath private constructor(val js : JsFieldPath ) {
441
+
442
+ actual companion object {
443
+ actual val documentId = FieldPath (JsFieldPath .documentId)
444
+ }
441
445
actual constructor (vararg fieldNames: String ) : this (dev.gitlive.firebase.firestore.rethrow {
442
446
js(" Reflect" ).construct(JsFieldPath , fieldNames).unsafeCast<JsFieldPath >()
443
447
})
444
- actual val documentId: FieldPath get() = FieldPath ( JsFieldPath .documentId)
448
+ actual val documentId: FieldPath get() = FieldPath .documentId
445
449
actual val encoded: EncodedFieldPath = js
446
450
override fun equals (other : Any? ): Boolean = other is FieldPath && js.isEqual(other.js)
447
451
override fun hashCode (): Int = js.hashCode()
You can’t perform that action at this time.
0 commit comments