When creating a new device for pairing, we can just generate the name.
It will be replaced during pairing anyways with the device name.
Also, instead if there already exists a corresponding device we can just
show the existing one.
machniak |
Restricted Project |
When creating a new device for pairing, we can just generate the name.
It will be replaced during pairing anyways with the device name.
Also, instead if there already exists a corresponding device we can just
show the existing one.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
src/resources/vue/CompanionApp/Info.vue | ||
---|---|---|
92–96 | Nothing improves by doing the second conditionally and this way we're doing them in parallel. | |
src/resources/vue/CompanionApp/List.vue | ||
69 | The name is not used as id, it's just a name for display. I agree that the mechanism used here to show existing instead of creating a new device by matching the name is not the prettiest approach, but it should normally work, and if it doesn't (because the language was changed) no harm is done either. The alternative would be to show the last device that was created that isn't paired, with the risk of picking the wrong one for recovery or regular. |