Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Use device IDs for nameless devices in device list #7081

Merged
merged 1 commit into from
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/components/views/settings/DevicesPanelEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ export default class DevicesPanelEntry extends React.Component<IProps, IState> {
<StyledCheckbox kind={CheckboxStyle.Outline} onChange={this.onDeviceToggled} checked={this.props.selected} />
</div>;

const deviceName = device.display_name ?
<React.Fragment>
<TextWithTooltip tooltip={device.display_name + " (" + device.device_id + ")"}>
{ device.display_name }
</TextWithTooltip>
</React.Fragment> :
<React.Fragment>
{ device.device_id }
</React.Fragment>;

const buttons = this.state.renaming ?
<form className="mx_DevicesPanel_renameForm" onSubmit={this.onRenameSubmit}>
<Field
Expand All @@ -182,9 +192,7 @@ export default class DevicesPanelEntry extends React.Component<IProps, IState> {
{ left }
<div className="mx_DevicesPanel_deviceInfo">
<div className="mx_DevicesPanel_deviceName">
<TextWithTooltip tooltip={device.display_name + " (" + device.device_id + ")"}>
{ device.display_name }
</TextWithTooltip>
{ deviceName }
</div>
<div className="mx_DevicesPanel_lastSeen">
{ lastSeen }
Expand Down