Skip to content

Commit

Permalink
Merge branch 'master' into 176027175-load-abis-from-cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
Undermaken authored Dec 7, 2020
2 parents 4d5cd80 + 3bf7b21 commit 1c8f07c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const styles = StyleSheet.create({
height: 25,
overflow: "hidden",
resizeMode: "contain"
},
text: {
flex: 1,
paddingRight: 16
}
});

Expand All @@ -26,6 +30,12 @@ export const PaymentMethodRepresentationComponent: React.FunctionComponent<Payme
<View style={styles.row}>
<Image source={props.icon} style={styles.cardIcon} />
<View hspacer={true} />
<Body testID={"paymentMethodCaptionId"}>{props.caption}</Body>
<Body
testID={"paymentMethodCaptionId"}
numberOfLines={1}
style={styles.text}
>
{props.caption}
</Body>
</View>
);
10 changes: 9 additions & 1 deletion ts/features/bonus/bpd/screens/details/BpdDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { bpdTransactionsForSelectedPeriod } from "../../store/reducers/details/t
import { bpdSelectedPeriodSelector } from "../../store/reducers/details/selectedPeriod";
import { navigateToBpdTransactions } from "../../navigation/actions";
import { emptyContextualHelp } from "../../../../../utils/emptyContextualHelp";
import { useHardwareBackButton } from "../../../bonusVacanze/components/hooks/useHardwareBackButton";
import { navigateBack } from "../../../../../store/actions/navigation";
import BpdPeriodSelector from "./BpdPeriodSelector";
import BpdPeriodDetail from "./periods/BpdPeriodDetail";
import GoToTransactions from "./transaction/GoToTransactions";
Expand Down Expand Up @@ -60,6 +62,11 @@ const BpdDetailsScreen: React.FunctionComponent<Props> = props => {
}
}, [props.unsubscription]);

useHardwareBackButton(() => {
props.goBack();
return true;
});

/**
* Display the transactions button when:
* - Period is closed and transactions number is > 0
Expand Down Expand Up @@ -118,7 +125,8 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
dispatch(bpdUnsubscribeCompleted());
dispatch(NavigationActions.back());
},
goToTransactions: () => dispatch(navigateToBpdTransactions())
goToTransactions: () => dispatch(navigateToBpdTransactions()),
goBack: () => dispatch(navigateBack())
});

const mapStateToProps = (state: GlobalState) => ({
Expand Down

0 comments on commit 1c8f07c

Please sign in to comment.