Skip to content

Commit 523ab83

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Add deprecation warning to AccessibilityInfo.fetch
Summary: This was already deprecated, but without a message. Reviewed By: zackargyle, ejanzer Differential Revision: D17180347 fbshipit-source-id: 44aa5d1821e56f7600033e82062c4661fe663471
1 parent ee5cb5a commit 523ab83

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ const AccessibilityInfo = {
9191
* Same as `isScreenReaderEnabled`
9292
*/
9393
get fetch(): () => Promise<boolean> {
94+
console.warn(
95+
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
96+
);
9497
return this.isScreenReaderEnabled;
9598
},
9699

Libraries/Components/AccessibilityInfo/AccessibilityInfo.ios.js

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ const AccessibilityInfo = {
165165
* Same as `isScreenReaderEnabled`
166166
*/
167167
get fetch(): $FlowFixMe {
168+
console.warn(
169+
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
170+
);
168171
return this.isScreenReaderEnabled;
169172
},
170173

0 commit comments

Comments
 (0)