From 9c3f2f44da15a563e792a136f297cd288a2d4367 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 27 Aug 2018 16:53:03 +0100 Subject: [PATCH] show animated activity indicator after the user presses the Play button (#261) --- app/src/component/button/view.js | 5 +- app/src/component/fileDownloadButton/view.js | 7 +- app/src/page/file/view.js | 71 +++++++++++--------- app/src/styles/filePage.js | 6 +- buildozer.spec.sample | 2 +- buildozer.spec.travis | 2 +- buildozer.spec.vagrant | 4 +- 7 files changed, 56 insertions(+), 41 deletions(-) diff --git a/app/src/component/button/view.js b/app/src/component/button/view.js index d0bdde34..ec3745eb 100644 --- a/app/src/component/button/view.js +++ b/app/src/component/button/view.js @@ -12,7 +12,8 @@ export default class Button extends React.PureComponent { text, icon, theme, - onPress + onPress, + onLayout } = this.props; let styles = [buttonStyle.button, buttonStyle.row]; @@ -41,7 +42,7 @@ export default class Button extends React.PureComponent { } return ( - + {icon && } {text && (text.trim().length > 0) && {text}} diff --git a/app/src/component/fileDownloadButton/view.js b/app/src/component/fileDownloadButton/view.js index fe05f737..2f9fbe87 100644 --- a/app/src/component/fileDownloadButton/view.js +++ b/app/src/component/fileDownloadButton/view.js @@ -42,7 +42,8 @@ class FileDownloadButton extends React.PureComponent { loading, doPause, style, - openFile + openFile, + onButtonLayout } = this.props; if (loading || downloading) { @@ -67,6 +68,7 @@ class FileDownloadButton extends React.PureComponent { return (