From dedb12129b28567128438be77373082b17cdaea3 Mon Sep 17 00:00:00 2001 From: Eric Kirkham Date: Mon, 16 Mar 2020 12:40:41 -0700 Subject: [PATCH] allow always/nearby toggle for #4876 --- src/components/ProfileDetail/LocationSwitchPanel.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ProfileDetail/LocationSwitchPanel.tsx b/src/components/ProfileDetail/LocationSwitchPanel.tsx index 2bc078540..08f1c9fe0 100644 --- a/src/components/ProfileDetail/LocationSwitchPanel.tsx +++ b/src/components/ProfileDetail/LocationSwitchPanel.tsx @@ -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) + } + }} /> )