Don't require setting a name

Authored by mollekopf on Mar 23 2023, 1:04 PM.



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.

Diff Detail

rK kolab
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Mar 23 2023, 1:04 PM
mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mar 23 2023, 1:31 PM
machniak added inline comments.

This request should probably be done only if the previous one was successful.


I think we should not use localized labels as an identifier (name). It will not work if user changes the name or UI language.

mollekopf added inline comments.Mar 26 2023, 11:28 PM

Nothing improves by doing the second conditionally and this way we're doing them in parallel.


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.
So I think we should just leave it as is, unless you have a good alternative approach.

machniak accepted this revision.Mar 27 2023, 7:56 AM
This revision is now accepted and ready to land.Mar 27 2023, 7:56 AM
Closed by commit rK0ff5e929ff67: Don't require setting a name (authored by Christian Mollekopf <>). · Explain WhyMar 27 2023, 9:31 AM
This revision was automatically updated to reflect the committed changes.