Show "Share my location" button (#8054)
This commit is contained in:
parent
2778fd135e
commit
e1fdff46f5
2 changed files with 67 additions and 27 deletions
|
@ -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> = ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue