Page MenuHomePhorge

Don't require setting a name
ClosedPublic

Authored by mollekopf on Mar 23 2023, 1:04 PM.
Tags
None
Referenced Files
F11803962: D4196.diff
Fri, Apr 19, 6:44 AM
Unknown Object (File)
Wed, Apr 17, 10:24 AM
Unknown Object (File)
Fri, Apr 12, 8:15 PM
Unknown Object (File)
Fri, Mar 29, 5:16 PM
Unknown Object (File)
Fri, Mar 29, 3:37 AM
Unknown Object (File)
Mar 13 2024, 10:36 PM
Unknown Object (File)
Feb 22 2024, 6:50 PM
Unknown Object (File)
Feb 22 2024, 1:53 AM
Subscribers

Details

Summary

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

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mar 23 2023, 1:31 PM
machniak added inline comments.
src/resources/vue/CompanionApp/Info.vue
92โ€“96

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

src/resources/vue/CompanionApp/List.vue
69

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

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

This revision is now accepted and ready to land.Mar 27 2023, 7:56 AM
This revision was automatically updated to reflect the committed changes.