ADD: Press and hold to expand transaction memo.

This commit is contained in:
Marcos Rodriguez 2019-09-18 22:57:03 -04:00 committed by Overtorment
parent c6ef19651c
commit 4ff57fc63e

View File

@ -1392,7 +1392,7 @@ export class BlueTransactionListItem extends Component {
itemPriceUnit: BitcoinUnit.BTC,
};
state = { transactionTimeToReadable: '...' };
state = { transactionTimeToReadable: '...', subtitleNumberOfLines: 1 };
txMemo = () => {
if (BlueApp.tx_metadata[this.props.item.hash] && BlueApp.tx_metadata[this.props.item.hash]['memo']) {
@ -1562,13 +1562,21 @@ export class BlueTransactionListItem extends Component {
});
}
onLongPress = () => {
if (this.state.subtitleNumberOfLines === 1) {
this.setState({ subtitleNumberOfLines: 0 });
}
};
render() {
return (
<BlueListItem
avatar={this.avatar()}
title={this.state.transactionTimeToReadable}
subtitle={this.subtitle()}
subtitleNumberOfLines={this.state.subtitleNumberOfLines}
onPress={this.onPress}
onLongPress={this.onLongPress}
badge={{
value: 3,
textStyle: { color: 'orange' },