[android][utils] Fix a couple of minor Android issues with internals refactor

This commit is contained in:
Chris Bianca 2018-01-08 09:20:32 +00:00
parent d1f2b3fcfa
commit fe19942e18
2 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import INTERNALS from '../../utils/internals';
import { isIOS } from '../../utils'; import { isIOS } from '../../utils';
import ModuleBase from '../../utils/ModuleBase'; import ModuleBase from '../../utils/ModuleBase';
import PACKAGE from '../../../package.json'; import PACKAGE from '../../../package.json';
import type App from '../core/firebase-app';
const FirebaseCoreModule = NativeModules.RNFirebase; const FirebaseCoreModule = NativeModules.RNFirebase;
@ -21,6 +22,13 @@ export const MODULE_NAME = 'RNFirebaseUtils';
export const NAMESPACE = 'utils'; export const NAMESPACE = 'utils';
export default class RNFirebaseUtils extends ModuleBase { export default class RNFirebaseUtils extends ModuleBase {
constructor(app: App) {
super(app, {
moduleName: MODULE_NAME,
namespace: NAMESPACE,
});
}
/** /**
* *
*/ */

View File

@ -51,7 +51,7 @@ export default {
if (isAndroid && namespace !== 'utils' && !INTERNALS.FLAGS.checkedPlayServices) { if (isAndroid && namespace !== 'utils' && !INTERNALS.FLAGS.checkedPlayServices) {
INTERNALS.FLAGS.checkedPlayServices = true; INTERNALS.FLAGS.checkedPlayServices = true;
this.utils().checkPlayServicesAvailability(); app.utils().checkPlayServicesAvailability();
} }
if (!APP_MODULES[app][namespace]) { if (!APP_MODULES[app][namespace]) {