diff options
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/main/DeviceRow.js | 15 | ||||
-rw-r--r-- | modern/src/settings/PreferencesPage.js | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/modern/src/main/DeviceRow.js b/modern/src/main/DeviceRow.js index bf5aec3e..4dac8128 100644 --- a/modern/src/main/DeviceRow.js +++ b/modern/src/main/DeviceRow.js @@ -62,17 +62,6 @@ const DeviceRow = ({ data, index, style }) => { const devicePrimary = useAttributePreference('devicePrimary', 'name'); const deviceSecondary = useAttributePreference('deviceSecondary', ''); - const formatProperty = (key) => { - if (key === 'geofenceIds') { - const geofenceIds = item[key] || []; - return geofenceIds - .filter((id) => geofences.hasOwnProperty(id)) - .map((id) => geofences[id].name) - .join(', '); - } - return item[key]; - }; - const secondaryText = () => { let status; if (item.status === 'online' || !item.lastUpdate) { @@ -82,7 +71,7 @@ const DeviceRow = ({ data, index, style }) => { } return ( <> - {deviceSecondary && item[deviceSecondary] && `${formatProperty(deviceSecondary)} • `} + {deviceSecondary && item[deviceSecondary] && `${item[deviceSecondary]} • `} <span className={classes[getStatusColor(item.status)]}>{status}</span> </> ); @@ -101,7 +90,7 @@ const DeviceRow = ({ data, index, style }) => { </Avatar> </ListItemAvatar> <ListItemText - primary={formatProperty(devicePrimary)} + primary={item[deviceSecondary]} primaryTypographyProps={{ noWrap: true }} secondary={secondaryText()} secondaryTypographyProps={{ noWrap: true }} diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js index fcf34739..a05924a9 100644 --- a/modern/src/settings/PreferencesPage.js +++ b/modern/src/settings/PreferencesPage.js @@ -27,7 +27,6 @@ const deviceFields = [ { id: 'phone', name: 'sharedPhone' }, { id: 'model', name: 'deviceModel' }, { id: 'contact', name: 'deviceContact' }, - { id: 'geofenceIds', name: 'sharedGeofences' }, ]; const useStyles = makeStyles((theme) => ({ |