mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
Fix name/subtitle for device.
This commit is contained in:
parent
e19f1a3bc5
commit
0b98312c14
@ -236,6 +236,10 @@ class _CurrentDeviceRow extends StatelessWidget {
|
||||
orElse: () => DeviceAvatar.deviceNode(node, radius: 64),
|
||||
);
|
||||
final messages = getDeviceMessages(node, data);
|
||||
// Reader name is same as Device name on Android:
|
||||
if (messages.first == messages.last) {
|
||||
messages.removeLast();
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
|
@ -44,7 +44,7 @@ List<String> getDeviceMessages(DeviceNode? node, AsyncValue<YubiKeyData> data) {
|
||||
case 'unknown-device':
|
||||
return ['Unrecognized device'];
|
||||
case 'device-inaccessible':
|
||||
return ['Device inaccessible'];
|
||||
return [node.name, 'Device inaccessible'];
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user