Conversation
507ab2f to
5be8452
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a user-toggleable way to raise the limits for importing custom words and refactors settings so those limits are configurable while improving import progress reporting and localization.
Changes:
- Adds a new
SwitchRaiseImportLimitspreference and corresponding settings (SettingsAddedWords) to control maximum import file length and total custom word count, including a UI entry in the “Added words” category and localized strings. - Refactors the settings inheritance chain (
SettingsHacksnow extendsSettingsAddedWords) soSettingsStorecan expose added-word behaviors like “no confirmation” and raised import limits centrally. - Updates
CustomWordsImporterandItemImportCustomWordsto use the new configurable limits, to validate file line count up front, and to switch progress handling to floats with more detailed progress display.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/xml/prefs_screen_languages.xml | Wires the renamed SwitchAddWordsWithoutConfirmation and adds the new SwitchRaiseImportLimits toggle under the custom words preference category. |
| app/src/main/res/values/strings.xml | Defines the base English title and detailed summary for the “Raise import limits” switch, including dynamic placeholders and warning text. |
| app/src/main/res/values-uk/strings.xml | Adds Ukrainian translations for the new “raise import limits” title and summary. |
| app/src/main/res/values-tr/strings.xml | Adds Turkish translations for the new import-limit summary and title. |
| app/src/main/res/values-ru/strings.xml | Adds Russian translations for the new import-limit summary and title. |
| app/src/main/res/values-pt-rBR/strings.xml | Adds Brazilian Portuguese translations for the new import-limit summary and title. |
| app/src/main/res/values-nl/strings.xml | Adds Dutch translations for the new import-limit summary and title. |
| app/src/main/res/values-lt/strings.xml | Adds Lithuanian translations for the new import-limit summary and title. |
| app/src/main/res/values-iw/strings.xml | Adds Hebrew translations for the import-limit summary and title (with a slight formatting inconsistency vs. other locales noted). |
| app/src/main/res/values-it/strings.xml | Adds Italian translations for the new import-limit summary and title. |
| app/src/main/res/values-fr/strings.xml | Adds French translations for the new import-limit summary and title. |
| app/src/main/res/values-es/strings.xml | Adds Spanish translations for the new import-limit summary and title. |
| app/src/main/res/values-de/strings.xml | Adds German translations for the new import-limit summary and title. |
| app/src/main/res/values-bg/strings.xml | Adds Bulgarian translations for the new import-limit summary and title. |
| app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsUI.java | Removes the getAddWordsNoConfirmation helper, which is now provided via the new SettingsAddedWords-based chain. |
| app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsStatic.java | Drops the hardcoded custom-words import and total limits in favor of the new configurable limits in SettingsAddedWords. |
| app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsHacks.java | Changes the base class from BaseSettings to SettingsAddedWords, threading added-words settings into the full SettingsStore hierarchy. |
| app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsAddedWords.java | New settings class encapsulating default and raised import limits plus getters for “add without confirmation” and “raise import limits”. |
| app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/SwitchRaiseImportLimits.java | New switch preference that sets the key, default, title, and dynamic summary text for raising custom word import limits, driven by SettingsAddedWords constants. |
| app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/SwitchAddWordsWithoutConfirmation.java | Renames and updates the class to SwitchAddWordsWithoutConfirmation while keeping the same preference key and behavior, and hides it when the main layout is stealth. |
| app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java | Updates progress handling to use floats with formatted percentages, tracks last progress, and passes SettingsStore into the importer so it can use the new configurable limits. |
| app/src/main/java/io/github/sspanak/tt9/db/customWords/CustomWordsImporter.java | Switches progress callbacks to float, injects max file-lines and word-count limits from settings, adds a pre-pass to validate line count, and uses the new maxWords in capacity checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java
Outdated
Show resolved
Hide resolved
5be8452 to
f3e3add
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/src/main/java/io/github/sspanak/tt9/db/customWords/CustomWordsImporter.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java
Show resolved
Hide resolved
8e3c9d0 to
5e0bb37
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...c/main/java/io/github/sspanak/tt9/preferences/screens/languages/SwitchRaiseImportLimits.java
Outdated
Show resolved
Hide resolved
5e0bb37 to
830ea10
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java
Show resolved
Hide resolved
app/src/main/java/io/github/sspanak/tt9/db/customWords/AbstractFileProcessor.java
Show resolved
Hide resolved
2a808c6 to
5c10a69
Compare
3dd6fd1 to
eeef93a
Compare
5c10a69 to
f7b799e
Compare
eeef93a to
064fb7f
Compare
f7b799e to
de151fb
Compare
No description provided.