Added
- Offline notes — Create, edit, and delete notes without an internet connection. Changes are saved locally and sync automatically when online.
- Conflict resolution — When a note is edited both offline and on the server, the app detects the conflict and creates a local copy with a "(Local copy)" suffix so no data is lost. A snackbar notifies you and offers "View copies" to find conflict copies.
- Sync status indicators — Notes screen shows connection status: cloud with checkmark (online), cloud with sync icon (syncing), or cloud off (offline).
- Settings → Offline mode — Toggle to enable or disable offline support (General section). Default: on.
Changed
- Notes screen — When offline mode is enabled, notes are stored in a local Room database and synced when connectivity returns. Refresh button is disabled when offline. "Saved locally" snackbar appears when saving offline.
Fixed
- Notes section crash — Opening the Notes tab no longer crashes. The app now declares
ACCESS_NETWORK_STATEsoConnectivityManageris available;OfflineNotesRepositoryhandles a missing service safely (treats as offline). When the Notes tab is shown with no current instance, a loading placeholder is shown instead of empty content. - Category labels wrapping — Category names in filter chips (e.g. "Uncategorized") and on note cards no longer break across multiple lines; they stay on one line with ellipsis when space is limited.
Technical
data/local/: JottyDatabase, NoteEntity, NoteDao, OfflineNotesRepository.ui/notes/: OfflineNotesScreen (wrapper), OfflineEnabledNotesScreen, OfflineNoteDetailScreen.- OfflineNotesRepository: connectivity monitoring via ConnectivityManager.NetworkCallback, auto-sync on network available.
- SettingsRepository:
offlineModeEnabled, KEY_OFFLINE_MODE. - ProGuard: keep rules for Room entities and DAOs.
- Documentation: OFFLINE_NOTES.md, CONFLICT_RESOLUTION.md, UI_CHANGES.md.
- strings.xml:
saved_locally,sync_conflicts_detected,view_conflicts,online,syncing,offline,offline_mode, etc. - AndroidManifest:
ACCESS_NETWORK_STATEpermission. - OfflineNotesRepository:
ConnectivityManagerobtained withas?, callback registered only when non-null;checkConnectivity()returns false when service is unavailable. - MainScreen: Notes composable shows centered "Loading" when
instanceIdis null. - OfflineEnabledNotesScreen, NotesScreen, NoteCard: category label
TextusesmaxLines = 1,overflow = TextOverflow.Ellipsis.