Skip to content

Commit

Permalink
allow always/nearby toggle for #4876
Browse files Browse the repository at this point in the history
  • Loading branch information
southerneer committed Mar 17, 2020
1 parent 422560a commit dedb121
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/ProfileDetail/LocationSwitchPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ const LocationSwitchPanel = ({onTypeToggle, shareType}: Props) => {
switchBorderRadius={16}
activeFontColor={WHITE}
fontColor={shareType === ALWAYS ? DARK_GREY : PINK}
disabled={shareType === DISABLED}
onValueChange={value => onTypeToggle(value ? NEARBY : ALWAYS)}
onValueChange={value => {
setLastType(value ? NEARBY : ALWAYS)
if (shareType !== DISABLED) {
onTypeToggle(value ? NEARBY : ALWAYS)
}
}}
/>
</View>
)
Expand Down

0 comments on commit dedb121

Please sign in to comment.