Skip to content

Commit

Permalink
Merge pull request #4932 from hippware/4876-2-sliders
Browse files Browse the repository at this point in the history
allow always/nearby toggle for #4876
  • Loading branch information
bengtan authored Mar 18, 2020
2 parents 422560a + dedb121 commit 1b0d039
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 1b0d039

Please sign in to comment.