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

Commit 4b8116f

Browse files
fix: remote config foregroundActivity instance #1049 (cleanup)
1 parent 4a41c62 commit 4b8116f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/firebase.android.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ firebase.getRemoteConfig = arg => {
517517
}
518518

519519
const runGetRemoteConfig = () => {
520+
appModule.off(appModule.resumeEvent, runGetRemoteConfig);
521+
520522
if (!firebase._isGooglePlayServicesAvailable()) {
521523
reject("Google Play services is required for this feature, but not available on this device");
522524
return;
@@ -558,9 +560,7 @@ firebase.getRemoteConfig = arg => {
558560
};
559561

560562
const onSuccessListener = new com.google.android.gms.tasks.OnSuccessListener({
561-
onSuccess: () => {
562-
returnMethod(false);
563-
}
563+
onSuccess: () => returnMethod(false)
564564
});
565565

566566
const onFailureListener = new com.google.android.gms.tasks.OnFailureListener({
@@ -585,7 +585,7 @@ firebase.getRemoteConfig = arg => {
585585
if (appModule.android.foregroundActivity) {
586586
runGetRemoteConfig();
587587
} else {
588-
// if this is called before application.start() wait for the event to fire
588+
// if this is called before application.start(), wait for the event to fire
589589
appModule.on(appModule.resumeEvent, runGetRemoteConfig);
590590
}
591591
} catch (ex) {

0 commit comments

Comments
 (0)