-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Labels
hacktoberfest-acceptedAccepted as a part of HacktoberfestAccepted as a part of HacktoberfestrefactorRefactor code to improve qualityRefactor code to improve quality
Description
Terms
- I have searched open and closed feature requests
- I agree to follow Scribe-Android's Code of Conduct
Description
After working on Add invalid state to keyboard commands and show localized Not in Wikidata and app crashing at startup on api 30 I've noticed some issues, which could lead to maintenance problems in future, and also push away potential maintainers.
Specifically, I see problems with GeneralKeyboardIME and and classes inheriting it.
Main things that, in my opinion, should be addressed:
- GeneralKeyboardIME mixes view management, database access, state handling, and business logic in ~2,100 lines. The suppression of TooManyFunctions and LargeClass hints at maintainability issues. This makes it difficult for potential contributors to understand or extend the code.
- isTablet duplicates in every subclass
- heavy use of non-null assertions (!!) in the subclasses when setting up the keyboard view
- fuzzy state management without stateholder
- base class knows about classes inheriting it (i.e baseKeyboardOfAnyLanguage function and many others)
- languages logic is based on strings comparison instead enums or sealed classes (i.e getLanguageAlias function)
- various code style issues (like using "when" in setupCommandBarTheme function), invalid log tags (like "my-tag") and so on
Contribution
I would like to discuss if necessary and fix some of listed problems in one (or multiple) separate PR's
Let me know, if you ok with it
andrewtavisandrewtavisandrewtavis
Metadata
Metadata
Assignees
Labels
hacktoberfest-acceptedAccepted as a part of HacktoberfestAccepted as a part of HacktoberfestrefactorRefactor code to improve qualityRefactor code to improve quality
Type
Projects
Status
In Progress