Commit Graph
6 Commits
Author SHA1 Message Date
M57andhy4ri b3765bd106 feat: in-app display language switcher (Settings → Appearance) (#604)
Add a Language selector to Settings → Appearance that overrides the app
display language independent of the device locale. Persists a BCP-47 code
in ServerStoreState.appLanguage; MainActivity.attachBaseContext applies it
via a ContextWrapper (works on minSdk 26, no AppCompat dependency needed
since the Activity is a plain ComponentActivity). Selecting a language
recreates the activity so resources re-resolve immediately.

Includes System default / English / 한국어 options, plus a unit test for
the locale-code resolver.

Note: the new string keys (settings_item_language, language_system,
language_english, language_korean) should be backfilled into values-ko
once PR #602 lands.

Co-authored-by: hy4ri <hy4ri@users.noreply.github.com>
2026-07-15 23:57:39 +03:00
M57 5bc5d17032 Refactor parseDaysOfWeek in CronExpressionFormatter (#510)
Refactored the deeply nested `parseDaysOfWeek` function using guard clauses to flatten the logic structure. By returning early on invalid conditions (`dowPart == "*" || domPart != "*" || monthPart != "*"` and `hoursList.size != 1 || minutesList.size != 1`), the remaining function body's indentation is reduced by two levels.

This improves overall code readability and maintainability without altering existing functionality. The change was verified against existing unit tests, which all pass.
2026-07-09 15:26:29 +03:00
M57 f7a334ecfd Refactor CronExpressionFormatter to improve maintainability (#192)
Extract logic from a single long method `cronToHumanReadable` into distinct parser helpers for shortcuts, day of month, days of week, and general time handling. Move repetitive static properties and small format helpers to the object scope.
2026-06-21 00:30:02 +03:00
M57 045932ca8b Optimize collection creation in Navigation.kt (#180)
* ⚡ Optimize collection creation in Navigation.kt

Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations.

* ⚡ Optimize collection creation in Navigation.kt

Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. Fixed ktlint formatting issues causing CI failure.
2026-06-20 23:44:39 +03:00
M57andM57 6375e3fa1d fix(#74): mark unparseable cron expressions instead of silently returning raw
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
2026-06-19 20:52:44 +03:00
Hy4ri 055b3381b1 Implement human-readable cron expression formatter on CronJobsScreen 2026-06-19 18:49:41 +03:00