Added
- ApiErrorHelper — Shared mapping of exceptions to user-friendly messages (no internet, timeout, server error, etc.) via string resources; used for list load errors, setup connection, and update check/install.
- ListScreenContent — Reusable composable in
ui/common/for loading / error / empty / pull-to-refresh list layout (used by Notes and Checklists). - Unit tests —
ApiClientTest(URL normalization),ApiErrorHelperTest(exception → string resource mapping).
Changed
- Null safety — Removed last
!!inSettingsRepository.setDefaultInstanceId. - Error messages — All API/network errors now use string resources and consistent messages (e.g. "No internet connection", "Something went wrong") instead of raw exception text.
- Update checker —
checkForUpdate(context)now takesContextfor localized error strings; "Unknown error" / "Install failed" moved to strings.xml. - Snackbar on failures — Create/update/delete for notes and checklists (and checklist items) now show a Snackbar on failure instead of failing silently.
Technical
- New string resources:
unknown_error,no_internet_connection,connection_timed_out,network_error,server_error,request_failed,save_failed,delete_failed,install_failed_fallback,no_apk_in_release. ApiClient.normalizeBaseUrl()extracted for testability.- Dependencies — Bumped to latest stable: Kotlin 2.2.21, Compose BOM 2025.12.00, Material3 (from BOM), lifecycle 2.8.7, activity-compose 1.11.0, navigation-compose 2.9.7, Retrofit 2.12.0, Bouncy Castle 1.79; removed redundant material3 version pin.
- Code — Removed redundant import in SettingsScreen.