Show "Share my location" button (#8054)

This commit is contained in:
Andy Balaam 2022-03-15 15:04:52 +00:00 committed by GitHub
parent 2778fd135e
commit e1fdff46f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 27 deletions

View file

@ -36,14 +36,17 @@ type Props = Omit<ILocationPickerProps, 'onChoose' | 'shareType'> & {
};
const getEnabledShareTypes = (): LocationShareType[] => {
const isPinDropLocationShareEnabled = SettingsStore.getValue("feature_location_share_pin_drop");
const enabledShareTypes = [LocationShareType.Own];
if (isPinDropLocationShareEnabled) {
return [LocationShareType.Own, LocationShareType.Pin];
if (SettingsStore.getValue("feature_location_share_live")) {
enabledShareTypes.push(LocationShareType.Live);
}
return [
LocationShareType.Own,
];
if (SettingsStore.getValue("feature_location_share_pin_drop")) {
enabledShareTypes.push(LocationShareType.Pin);
}
return enabledShareTypes;
};
const LocationShareMenu: React.FC<Props> = ({