Skip to content

Commit

Permalink
Custom route hints: hide selection if hints disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed May 11, 2024
1 parent 472ae64 commit d80ed97
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions views/Receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2473,47 +2473,51 @@ export default class Receive extends React.Component<
</Row>
)}

{BackendUtils.isLNDBased() && (
<HopPicker
ref={(ref) =>
(this.hopPickerRef = ref)
}
onValueChange={(channels) => {
this.setState({
selectedRouteHintChannels:
channels
});
}}
onCancel={() => {
if (
!selectedRouteHintChannels?.length
) {
setRouteHintMode(
{BackendUtils.isLNDBased() &&
routeHints && (
<HopPicker
ref={(ref) =>
(this.hopPickerRef =
ref)
}
onValueChange={(
channels
) => {
this.setState({
selectedRouteHintChannels:
channels
});
}}
onCancel={() => {
if (
!selectedRouteHintChannels?.length
) {
setRouteHintMode(
RouteHintMode.Automatic
);
}
}}
title={localeString(
'views.Receive.customRouteHints'
)}
ChannelsStore={
this.props.ChannelsStore
}
UnitsStore={UnitsStore}
containerStyle={{
display:
routeHintMode ===
RouteHintMode.Automatic
);
? 'none'
: 'flex'
}}
clearOnTap={false}
selectionMode={'multiple'}
selectedChannels={
selectedRouteHintChannels
}
}}
title={localeString(
'views.Receive.customRouteHints'
)}
ChannelsStore={
this.props.ChannelsStore
}
UnitsStore={UnitsStore}
containerStyle={{
display:
routeHintMode ===
RouteHintMode.Automatic
? 'none'
: 'flex'
}}
clearOnTap={false}
selectionMode={'multiple'}
selectedChannels={
selectedRouteHintChannels
}
/>
)}
/>
)}

{BackendUtils.supportsAMP() &&
!lspIsActive && (
Expand Down

0 comments on commit d80ed97

Please sign in to comment.