mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-24 02:33:44 +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),
|
orElse: () => DeviceAvatar.deviceNode(node, radius: 64),
|
||||||
);
|
);
|
||||||
final messages = getDeviceMessages(node, data);
|
final messages = getDeviceMessages(node, data);
|
||||||
|
// Reader name is same as Device name on Android:
|
||||||
|
if (messages.first == messages.last) {
|
||||||
|
messages.removeLast();
|
||||||
|
}
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -44,7 +44,7 @@ List<String> getDeviceMessages(DeviceNode? node, AsyncValue<YubiKeyData> data) {
|
|||||||
case 'unknown-device':
|
case 'unknown-device':
|
||||||
return ['Unrecognized device'];
|
return ['Unrecognized device'];
|
||||||
case 'device-inaccessible':
|
case 'device-inaccessible':
|
||||||
return ['Device inaccessible'];
|
return [node.name, 'Device inaccessible'];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user