diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js index fcead57588d9..485b40c1e983 100644 --- a/src/components/PDFView/index.js +++ b/src/components/PDFView/index.js @@ -25,7 +25,7 @@ class PDFView extends Component { }; this.onDocumentLoadSuccess = this.onDocumentLoadSuccess.bind(this); this.initiatePasswordChallenge = this.initiatePasswordChallenge.bind(this); - this.attemptPdfLoad = this.attemptPdfLoad.bind(this); + this.attemptPDFLoad = this.attemptPDFLoad.bind(this); this.toggleKeyboardOnSmallScreens = this.toggleKeyboardOnSmallScreens.bind(this); } @@ -84,7 +84,7 @@ class PDFView extends Component { * * @param {String} password Password to send via callback to react-pdf */ - attemptPdfLoad(password) { + attemptPDFLoad(password) { this.onPasswordCallback(password); } @@ -150,7 +150,7 @@ class PDFView extends Component { {this.state.shouldRequestPassword && ( this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} shouldAutofocusPasswordField={!this.props.isSmallScreenWidth} diff --git a/src/components/PDFView/index.native.js b/src/components/PDFView/index.native.js index bf2a632dc32e..46474eb73705 100644 --- a/src/components/PDFView/index.native.js +++ b/src/components/PDFView/index.native.js @@ -32,15 +32,15 @@ class PDFView extends Component { super(props); this.state = { shouldRequestPassword: false, - shouldAttemptPdfLoad: true, + shouldAttemptPDFLoad: true, shouldShowLoadingIndicator: true, isPasswordInvalid: false, failedToLoadPDF: false, password: '', }; this.initiatePasswordChallenge = this.initiatePasswordChallenge.bind(this); - this.attemptPdfLoadWithPassword = this.attemptPdfLoadWithPassword.bind(this); - this.finishPdfLoad = this.finishPdfLoad.bind(this); + this.attemptPDFLoadWithPassword = this.attemptPDFLoadWithPassword.bind(this); + this.finishPDFLoad = this.finishPDFLoad.bind(this); this.handleFailureToLoadPDF = this.handleFailureToLoadPDF.bind(this); } @@ -56,7 +56,7 @@ class PDFView extends Component { this.setState({ failedToLoadPDF: true, - shouldAttemptPdfLoad: false, + shouldAttemptPDFLoad: false, }); } @@ -74,7 +74,7 @@ class PDFView extends Component { // Render password form, and don't render PDF and loading indicator. this.setState({ shouldRequestPassword: true, - shouldAttemptPdfLoad: false, + shouldAttemptPDFLoad: false, }); // The message provided by react-native-pdf doesn't indicate whether this @@ -92,13 +92,13 @@ class PDFView extends Component { * * @param {String} password Password submitted via PDFPasswordForm */ - attemptPdfLoadWithPassword(password) { + attemptPDFLoadWithPassword(password) { // Render react-native-pdf/PDF so that it can validate the password. // Note that at this point in the password challenge, shouldRequestPassword is true. // Thus react-native-pdf/PDF will be rendered - but not visible. this.setState({ password, - shouldAttemptPdfLoad: true, + shouldAttemptPDFLoad: true, shouldShowLoadingIndicator: true, }); } @@ -107,7 +107,7 @@ class PDFView extends Component { * After the PDF is successfully loaded hide PDFPasswordForm and the loading * indicator. */ - finishPdfLoad() { + finishPDFLoad() { this.setState({ shouldRequestPassword: false, shouldShowLoadingIndicator: false, @@ -146,7 +146,7 @@ class PDFView extends Component { )} - {this.state.shouldAttemptPdfLoad && ( + {this.state.shouldAttemptPDFLoad && ( )} {this.state.shouldRequestPassword && ( this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} shouldShowLoadingIndicator={this.state.shouldShowLoadingIndicator}