[auth] Move useDeviceLanguage to unsupported method
This commit is contained in:
parent
f970d882ba
commit
9ea0a5cc7f
|
@ -714,11 +714,6 @@ declare module "react-native-firebase" {
|
|||
*/
|
||||
signOut(): Promise<void>
|
||||
|
||||
/**
|
||||
* Sets the language for the auth instance to the device language
|
||||
*/
|
||||
useDeviceLanguage(): void
|
||||
|
||||
[key: string]: any;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export default class Auth extends ModuleBase {
|
|||
});
|
||||
this._user = null;
|
||||
this._authResult = null;
|
||||
this._languageCode = this._native.APP_LANGUAGE[firebaseApp._name] || null;
|
||||
this._languageCode = getNativeModule(this).APP_LANGUAGE[app._name] || null;
|
||||
|
||||
SharedEventEmitter.addListener(
|
||||
// sub to internal native event - this fans out to
|
||||
|
@ -335,14 +335,6 @@ export default class Auth extends ModuleBase {
|
|||
return getNativeModule(this).fetchProvidersForEmail(email);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the language for the auth module using the device language
|
||||
* @returns {*}
|
||||
*/
|
||||
useDeviceLanguage() {
|
||||
this._native.useDeviceLanguage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the language for the auth module
|
||||
* @param code
|
||||
|
@ -350,7 +342,7 @@ export default class Auth extends ModuleBase {
|
|||
*/
|
||||
set languageCode(code: string) {
|
||||
this._languageCode = code;
|
||||
this._native.setLanguageCode(code);
|
||||
getNativeModule(this).setLanguageCode(code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -392,6 +384,10 @@ export default class Auth extends ModuleBase {
|
|||
signInWithRedirect() {
|
||||
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'signInWithRedirect'));
|
||||
}
|
||||
|
||||
useDeviceLanguage() {
|
||||
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'useDeviceLanguage'));
|
||||
}
|
||||
}
|
||||
|
||||
export const statics = {
|
||||
|
|
Loading…
Reference in New Issue