Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Remove superfluous KeyboardService #841

Merged
merged 1 commit into from May 17, 2022
Merged

Conversation

jpnurmi
Copy link
Contributor

@jpnurmi jpnurmi commented May 16, 2022

Keyboard layout loading used to be a much more complicated process that
involved non-trivial data structures. The KeyboardService class (or
KeyboardModel as it was called then) was introduced to help with that
complexity.

These days, loading the layouts is so straightforward that a separate
KeyboardService no longer serves a purpose. Any view model can get the
list of layouts by calling SubiquityClient.keyboard(), which returns a
KeyboardSetup that contains a List<KeyboardLayout> that can be used as
is. There's no parsing, tuples, or maps involved anymore, where some
help was needed. :)

Keyboard layout loading used to be a much more complicated process that
involved non-trivial data structures. The KeyboardService class (or
KeyboardModel as it was called then) was introduced to help with that
complexity.

These days, loading the layouts is so straightforward that a separate
KeyboardService no longer serves a purpose. Any view model can get the
list of layouts by calling SubiquityClient.keyboard(), which returns a
KeyboardSetup that contains a List<KeyboardLayout> that can be used as
is. There's no parsing, tuples, or maps involved anymore, where some
help was needed. :)
Copy link
Contributor

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jpnurmi jpnurmi merged commit a5652d2 into canonical:main May 17, 2022
@jpnurmi jpnurmi deleted the keyboard-service branch May 17, 2022 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants