Skip to content

Stats calculation fixes, accessibility blockerService fix and spanish internationalization#35

Merged
PranavPurwar merged 15 commits intoaload0:mainfrom
alv-cor:main
Jan 18, 2026
Merged

Stats calculation fixes, accessibility blockerService fix and spanish internationalization#35
PranavPurwar merged 15 commits intoaload0:mainfrom
alv-cor:main

Conversation

@alv-cor
Copy link
Contributor

@alv-cor alv-cor commented Jan 18, 2026

This pull request introduces several improvements and fixes across the codebase, focusing on internationalization (i18n), UI text consistency, build configuration, and logic corrections for app usage statistics. The main highlights are enhanced support for string resources, pluralization, and proper date calculations, leading to a more robust and user-friendly experience.

Internationalization and UI Text Consistency

  • Replaced hardcoded UI strings in MainActivity.kt and MainScreen.kt with string resources using stringResource() and plural resources, improving localization and consistency throughout the app. This includes navigation labels, card titles, button texts, and timer descriptions. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Updated pluralization logic for whitelisted apps and routine creation, using quantity strings and plural resources for accurate display based on app counts and time intervals. [1] [2]

Build Configuration Updates

  • Added the kotlin.android plugin to the Gradle build file and made minor adjustments to the Android build configuration for better compatibility and future-proofing. [1] [2] [3]

App Usage Statistics Logic Fixes

  • Corrected date calculation logic in AppUsageViewModel.kt for weekly statistics, ensuring accurate week offsets and proper handling of previous week data checks. This fixes issues with how days and weeks are computed and iterated. [1] [2] [3]

Manifest and Code Cleanup

  • Removed unused or commented-out process attributes and debug logs from AndroidManifest.xml for clarity and maintainability. [1] [2] [3]

Minor UI Enhancements

  • Passed Context to components where needed to support quantity strings and localization features, such as in the TimeLimitsCard. [1] [2]

Let me know if you want to dive deeper into any of these areas or see the specific code changes!

alv-cor and others added 14 commits January 16, 2026 15:30
Reworks the logic for calculating app foreground time using UsageEvents, improving accuracy and compatibility with newer Android versions. Introduces separate event queries for lookback and main intervals, and simplifies event handling for ACTIVITY_RESUMED and ACTIVITY_PAUSED.
Introduces a new strings.xml file with Spanish translations for all user-facing text in the application, supporting localization for Spanish-speaking users.
Added kotlin-android plugin and set JVM target in Reef and appintro build scripts. Updated gradle.properties with new Android build options. Refreshed library versions in libs.versions.toml, including AGP, Compose BOM, Material3, and others.
Remove `android:process=":blocker_process` since it makes the blockservice fail
Added androidx.startup.InitializationProvider to the manifest to support initialization of WorkManager. The provider is set as non-exported and includes meta-data for WorkManagerInitializer, with node removal specified for merging.
Updated MainActivity to use string resources for navigation bar labels and time suffixes instead of hardcoded strings. This improves localization and consistency across the app.
Introduced a 5-minute selection to the time options in AppSelectorDialog for improved granularity when setting durations.
Corrects the calculation of days for week offset and day iteration in AppUsageViewModel. Updates logic to properly add/subtract days and checks for usage data more accurately, ensuring correct navigation and data retrieval for previous weeks.
Introduces new string resources for focus session states, slide actions, sample routines, and bottom navigation in both English and Spanish. Also updates several existing strings for consistency and clarity.
Extracted event querying into a helper function for cleaner code. Improved logic for tracking package foreground times by handling noisy packages and ensuring accurate duration calculation. This refactor enhances maintainability and correctness of screen usage tracking.
Removed several deprecated Android Gradle properties.
@alv-cor alv-cor mentioned this pull request Jan 18, 2026
@PranavPurwar PranavPurwar merged commit aba5384 into aload0:main Jan 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants