Summary:
Modify deprecation warning message for `AccessibilityInfo.fetch`

- https://reactnative.dev/docs/accessibilityinfo#isscreenreaderenabled
- 523ab83338

## Changelog

[Internal] [Changed] - Modify deprecation warning message for `AccessibilityInfo.fetch`
Pull Request resolved: https://github.com/facebook/react-native/pull/28514

Test Plan: Try using `AccessibilityInfo.fetch` and check log

Reviewed By: cpojer

Differential Revision: D20850223

Pulled By: TheSavior

fbshipit-source-id: e21bb20b7a02d9f2ed6e27e2bfecbac0aebf9e09
This commit is contained in:
jiggag 2020-04-04 01:08:04 -07:00 коммит произвёл Facebook GitHub Bot
Родитель e2c417f7cf
Коммит caa7829aac
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -93,7 +93,7 @@ const AccessibilityInfo = {
*/
get fetch(): () => Promise<boolean> {
console.warn(
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
'AccessibilityInfo.fetch is deprecated, call AccessibilityInfo.isScreenReaderEnabled instead',
);
return this.isScreenReaderEnabled;
},

Просмотреть файл

@ -167,7 +167,7 @@ const AccessibilityInfo = {
*/
get fetch(): $FlowFixMe {
console.warn(
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
'AccessibilityInfo.fetch is deprecated, call AccessibilityInfo.isScreenReaderEnabled instead',
);
return this.isScreenReaderEnabled;
},