File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
androidMain/kotlin/dev/gitlive/firebase/firestore
commonTest/kotlin/dev/gitlive/firebase/firestore
jsMain/kotlin/dev/gitlive/firebase/firestore Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ actual class FirebaseFirestore(val android: com.google.firebase.firestore.Fireba
7575 else -> throw IllegalArgumentException (" Existing settings is not of a valid type" )
7676 }
7777 } ? : kotlin.run {
78+ @Suppress(" DEPRECATION" )
7879 when {
7980 isPersistenceEnabled -> LocalCacheSettings .Persistent (cacheSizeBytes)
8081 cacheSizeBytes == FirestoreSettings .CACHE_SIZE_UNLIMITED -> LocalCacheSettings .Memory (GarbageCollectorSettings .Eager )
@@ -112,7 +113,6 @@ actual class FirebaseFirestore(val android: com.google.firebase.firestore.Fireba
112113
113114 actual fun useEmulator (host : String , port : Int ) {
114115 android.useEmulator(host, port)
115- android.firestoreSettings = firestoreSettings { }
116116 }
117117
118118 actual suspend fun disableNetwork () =
Original file line number Diff line number Diff line change @@ -102,9 +102,7 @@ class FirebaseFirestoreTest {
102102 useEmulator(emulatorHost, 8080 )
103103 settings = firestoreSettings(settings) {
104104 cacheSettings = memoryCacheSettings {
105- gcSettings = memoryLruGcSettings {
106- sizeBytes = 50L * 1024L * 1024L
107- }
105+ gcSettings = memoryEagerGcSettings { }
108106 }
109107 }
110108 }
Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ actual class FirebaseFirestore(app: JsFirebaseApp) {
105105 rethrow { clearIndexedDbPersistence(js).await() }
106106
107107 actual fun useEmulator (host : String , port : Int ) = rethrow {
108+ settings = firestoreSettings(settings) {
109+ this .host = " $host :$port "
110+ }
108111 emulatorSettings = EmulatorSettings (host, port)
109112 }
110113
You can’t perform that action at this time.
0 commit comments