Commit Graph

5 Commits

Author SHA1 Message Date
Marvin 30bfe441f8 Fix: Sort menu now shows friendly labels instead of CAPS codes
Changed sort_options array back to user-friendly text (Most Recent, A to Z, etc.)
and added position-based mapping in NotesListFragment to convert between display
labels and internal storage codes.

Added helper methods:
- getSortCodeFromPosition(int): Maps spinner position to internal code
- getPositionFromSortCode(String): Maps internal code back to spinner position

This provides much better UX while maintaining full functionality.
2026-03-17 16:56:14 -03:00
Marvin 35bddd27c4 Fix: Sort menu now works correctly
The sort spinner used display strings like 'Most Recent' but the code expected
internal codes like 'MOST_RECENT'. This mismatch caused sorting to always fail.

Changed sort_options array to use exact values expected by NotesStorage.sortNotes():
2026-03-17 16:43:39 -03:00
Marvin 3af91ed8c0 Fix: Properly initialize original values when loading notes from storage
When deserializing a Note from JSON, the constructor was called first which
initialized original tracking with empty values. Then the JSON fields were
parsed and set, but hasChanges() would always return true because it compared
the loaded content against empty originals.

Solution: Call markAsSaved() after parsing in fromJson() to update the original
tracking with the actual loaded data.
2026-03-17 16:30:49 -03:00
Marvin 7d3122f137 Fix: Date/time now shows last edited time, not last opened
The app was incorrectly updating the note's timestamp every time it was saved,
even when no changes were made. This caused the displayed date to show 'last
opened' instead of 'created/last edited'.

Changes:
- Added hasChanges() method to Note model to detect actual content modifications
- Added markAsSaved() method to update original values after successful save
- Modified saveNoteImmediately() to only update timestamp when changes exist
- Used transient fields for tracking original values (not serialized)
2026-03-17 16:21:37 -03:00
Marvin 0c69cd11c5 Initial commit: Notes App with text and checklist support
Features:
- Create, edit, and delete notes (text or checklist)
- Sort notes by date or alphabetically
- Dark theme UI with Material Design components
- Checklist items with checkboxes and progress tracking
- Floating action buttons for adding/deleting checklist items
- Auto-save functionality
- Swipe to delete from list

Technical:
- Android Studio project with Gradle build system
- SQLite database via Room-like storage (SharedPreferences)
- RecyclerView for efficient note/item lists
- Fragment-based navigation

Bug Fixes:
- Fixed new notes not appearing in main view after creation
- Added onResume() refresh to NotesListFragment
- Corrected ID assignment and counter logic in NotesStorage
2026-03-17 14:51:36 -03:00