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

Commit 4a059ad

Browse files
authored
Replace deprecated currentContext with context
1 parent 9bbd507 commit 4a059ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firebase.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ firebase.init = arg => {
314314
initializeArguments = arg;
315315

316316
com.google.firebase.analytics.FirebaseAnalytics.getInstance(
317-
appModule.android.currentContext || com.tns.NativeScriptApplication.getInstance()
317+
appModule.android.context || com.tns.NativeScriptApplication.getInstance()
318318
).setAnalyticsCollectionEnabled(arg.analyticsCollectionEnabled !== false);
319319

320320
if (typeof (com.google.firebase.database) !== "undefined" && typeof (com.google.firebase.database.ServerValue) !== "undefined") {
@@ -1114,7 +1114,7 @@ firebase.login = arg => {
11141114

11151115
const signInIntent = com.google.android.gms.auth.api.Auth.GoogleSignInApi.getSignInIntent(firebase._mGoogleApiClient);
11161116

1117-
appModule.android.currentContext.startActivityForResult(signInIntent, GOOGLE_SIGNIN_INTENT_ID);
1117+
appModule.android.context.startActivityForResult(signInIntent, GOOGLE_SIGNIN_INTENT_ID);
11181118

11191119
const callback = (eventData: AndroidActivityResultEventData) => {
11201120
if (eventData.requestCode === GOOGLE_SIGNIN_INTENT_ID) {

0 commit comments

Comments
 (0)