refactor: extract KeyboardDataHandler from GeneralKeyboardIME (Part 8) - #679
Merged
andrewtavis merged 2 commits intoAug 23, 2026
Merged
Conversation
Member
|
Thanks for the PR, @prince-0408! Similarly, @linreal, if you'd have a moment to check it'd be great, but I can also take a look over the weekend at some point 😊 |
Collaborator
Author
Thanks @andrewtavis! Take your time, no rush at all. Have a great weekend! 😊 |
andrewtavis
approved these changes
Aug 23, 2026
andrewtavis
left a comment
Member
There was a problem hiding this comment.
praise: Checking this with @angrezichatterbox now, @prince-0408 😊 All's looking good for us! Thanks so much for your continued work on refactoring :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is Part 8 in modularizing
GeneralKeyboardIMEfor #426.It extracts database manager initializations, data contract loading, dictionary queries, translations, plurals, and autocompletion queries out of
GeneralKeyboardIME.ktinto a standalone helper classKeyboardDataHandler.Detailed Changes Table:
KeyboardDataHandler.ktDatabaseManagers,AutocompletionDataManager, dictionary data contracts (dataContract,emojiKeywords,pluralWords,nounKeywords,suggestionWords,caseAnnotation,conjugateOutput,conjugateLabels), and query methods (loadLanguageData,getAutocompletions,getPluralRepresentation,getTranslation,queryConjugateData).GeneralKeyboardIME.ktinto a dedicated helper class.GeneralKeyboardIME.ktdataHandlerand delegated database data properties (dataContract,emojiKeywords,pluralWords,nounKeywords,suggestionWords,caseAnnotation,conjugateOutput,conjugateLabels,dbManagers,autocompletionManager). Refactored data loading & query methods (loadLanguageData,getAutocompletions,getPluralRepresentation,getTranslation) to delegate toKeyboardDataHandler.GeneralKeyboardIME.ktwhile maintaining 100% backward compatibility for all callers.KeyboardDataHandlerTest.ktnull, empty, andALREADY_PLURAL_MSG).Key Benefits:
DatabaseManagersaccess and dictionary contract handling fromGeneralKeyboardIME.kt.KeyHandler,BackspaceHandler,SuggestionHandler,AutocompletionHandler,KeyboardUIManager, etc.).Related Issue
Refactors part of #426