Skip to content

Commit

Permalink
Add deprecation warning to AccessibilityInfo.fetch
Browse files Browse the repository at this point in the history
Summary: This was already deprecated, but without a message.

Reviewed By: zackargyle, ejanzer

Differential Revision: D17180347

fbshipit-source-id: 44aa5d1821e56f7600033e82062c4661fe663471
  • Loading branch information
elicwhite authored and facebook-github-bot committed Sep 19, 2019
1 parent ee5cb5a commit 523ab83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ const AccessibilityInfo = {
* Same as `isScreenReaderEnabled`
*/
get fetch(): () => Promise<boolean> {
console.warn(
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
);
return this.isScreenReaderEnabled;
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ const AccessibilityInfo = {
* Same as `isScreenReaderEnabled`
*/
get fetch(): $FlowFixMe {
console.warn(
'AccessibilityInfo.fetch is deprecated, call Accessibility.isScreenReaderEnabled instead',
);
return this.isScreenReaderEnabled;
},

Expand Down

0 comments on commit 523ab83

Please sign in to comment.