Skip to content

Commit

Permalink
Merge pull request #2939 from BlueWallet/flexweirdness
Browse files Browse the repository at this point in the history
REF: Fix layout on invoice view
  • Loading branch information
GladosBlueWallet authored Apr 13, 2021
2 parents 20aa6ed + 4e9aed6 commit ac0c6ee
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions screen/lnd/lndViewInvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,54 +240,57 @@ const LNDViewInvoice = () => {
}
// Invoice has not expired, nor has it been paid for.
return (
<View style={[styles.activeRoot, stylesHook.root]}>
<View style={styles.activeQrcode}>
<QRCode
value={invoice.payment_request}
logo={require('../../img/qr-code.png')}
size={qrCodeSize}
logoSize={90}
color="#000000"
logoBackgroundColor={colors.brandingColor}
backgroundColor="#FFFFFF"
/>
</View>
<ScrollView>
<View style={[styles.activeRoot, stylesHook.root]}>
<View style={styles.activeQrcode}>
<QRCode
value={invoice.payment_request}
logo={require('../../img/qr-code.png')}
size={qrCodeSize}
logoSize={90}
color="#000000"
logoBackgroundColor={colors.brandingColor}
backgroundColor="#FFFFFF"
/>
</View>

<BlueSpacing20 />
<BlueText>
{loc.lndViewInvoice.please_pay} {invoice.amt} {loc.lndViewInvoice.sats}
</BlueText>
{'description' in invoice && invoice.description.length > 0 && (
<BlueSpacing20 />
<BlueText>
{loc.lndViewInvoice.for} {invoice.description}
{loc.lndViewInvoice.please_pay} {invoice.amt} {loc.lndViewInvoice.sats}
</BlueText>
)}
<BlueCopyTextToClipboard text={invoice.payment_request} />
{'description' in invoice && invoice.description.length > 0 && (
<BlueText>
{loc.lndViewInvoice.for} {invoice.description}
</BlueText>
)}
<BlueCopyTextToClipboard text={invoice.payment_request} />

<BlueButton onPress={handleOnSharePressed} title={loc.receive.details_share} />
<BlueButton onPress={handleOnSharePressed} title={loc.receive.details_share} />

<BlueSpacing20 />
<BlueButton
style={stylesHook.additionalInfo}
onPress={handleOnViewAdditionalInformationPressed}
title={loc.lndViewInvoice.additional_info}
/>
</View>
<BlueSpacing20 />
<BlueButton
style={stylesHook.additionalInfo}
onPress={handleOnViewAdditionalInformationPressed}
title={loc.lndViewInvoice.additional_info}
/>
</View>
</ScrollView>
);
}
};

return (
<SafeBlueArea onLayout={onLayout}>
<StatusBar barStyle="default" />
<ScrollView>{render()}</ScrollView>
{render()}
</SafeBlueArea>
);
};

const styles = StyleSheet.create({
root: {
flex: 1,
justifyContent: 'space-between',
},
justifyContentCenter: {
justifyContent: 'center',
Expand Down

0 comments on commit ac0c6ee

Please sign in to comment.