Skip to content

Conversation

@davideast
Copy link
Collaborator

Add settings to preload callbacks

This PR adds settings callbacks to all preload methods:

preloadDatabase(app, db => db().goOffline());
preloadAuth(app, auth => auth()...);
preloadAnalytics(app, analytics => analytics()...);
preloadFirestore(app, firestore => firestore().enablePersistence());
preloadFunctions(app, functions => functions()...);
preloadMessaging(app, messaging => messaging()...);
preloadPerformance(app, performance => performance()...);
preloadRemoteConfig(app, remoteConfig => {
   remoteConfig.settings = { }
   return remoteConfig().fetchAndActivate();
});
preloadStorage(app, storage => storage().setMaxUploadRetryTime(10000));

closes #203

@davideast davideast requested a review from jhuleatt January 31, 2020 02:32
Copy link
Collaborator

@jhuleatt jhuleatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! A todo for the future is to remove initPerformance from FirebaseAppProvider now that it's easy to initialize it like all the other SDKs

@jhuleatt jhuleatt merged commit e2f1b1f into master Jan 31, 2020
@jhuleatt jhuleatt deleted the de-preload-sdk branch January 31, 2020 19:02
@FirebaseExtended FirebaseExtended locked and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing in FireStore settings possible?

2 participants