Merge branch 'master' into filepicker

This commit is contained in:
Marcos Rodriguez 2020-01-08 14:17:04 -05:00
commit dcc51b57de
2 changed files with 7 additions and 8 deletions

View file

@ -46,7 +46,7 @@ export default class LNDViewInvoice extends Component {
BackHandler.addEventListener('hardwareBackPress', this.handleBackButton);
}
async componentDidMount() {
componentDidMount() {
this.fetchInvoiceInterval = setInterval(async () => {
if (this.state.isFetchingInvoices) {
try {
@ -277,11 +277,9 @@ export default class LNDViewInvoice extends Component {
</View>
<BlueSpacing20 />
{invoice && invoice.amt && (
<BlueText>
{loc.lndViewInvoice.please_pay} {invoice.amt} {loc.lndViewInvoice.sats}
</BlueText>
)}
<BlueText>
{loc.lndViewInvoice.please_pay} {invoice.amt} {loc.lndViewInvoice.sats}
</BlueText>
{invoice && invoice.hasOwnProperty('description') && invoice.description.length > 0 && (
<BlueText>
{loc.lndViewInvoice.for} {invoice.description}

View file

@ -41,6 +41,7 @@ export default class WalletsList extends Component {
wallets: BlueApp.getWallets().concat(false),
lastSnappedTo: 0,
timeElpased: 0,
cameraPreviewIsPaused: true,
};
EV(EV.enum.WALLETS_COUNT_CHANGED, () => this.redrawScreen(true));
@ -300,7 +301,7 @@ export default class WalletsList extends Component {
onSwiperIndexChanged = index => {
StatusBar.setBarStyle(index === 1 ? 'dark-content' : 'light-content');
this.setState({ cameraPreviewIsPaused: index === 1 });
this.setState({ cameraPreviewIsPaused: index === 1 || index === undefined });
};
onBarScanned = value => {
@ -333,7 +334,7 @@ export default class WalletsList extends Component {
<NavigationEvents
onDidFocus={() => {
this.redrawScreen();
this.setState({ cameraPreviewIsPaused: this.swiperRef.current.index === 1 });
this.setState({ cameraPreviewIsPaused: this.swiperRef.current.index === 1 || this.swiperRef.current.index === undefined });
}}
onWillBlur={() => this.setState({ cameraPreviewIsPaused: true })}
/>