Commit bab506a
committed
v2.4.1 feat(fixes) stability improvements and fixes
Summary of Fixes:
1.
Fixed Data Loss (Persistence):
◦
Removed fallbackToDestructiveMigration(dropAllTables = true) from the Room database builder in AppModule.kt.
◦
This prevents the app from automatically wiping all your notes and data whenever a database schema change occurs during an update.
2.
Enabled Image Loading:
◦
Integrated the Coil image loading library into the project.
◦
Updated the EditorScreen to use AsyncImage. Images attached to your notes will now render correctly instead of showing a placeholder icon.
3.
Default to Read Mode:
◦
Updated the EditorScreen logic to automatically open existing notes in Preview (Read) Mode.
◦
New notes will still open in Edit Mode by default so you can start typing immediately.
◦
You can toggle between modes using the Edit/Preview icon in the top toolbar.
Technical Details:
•
Dependencies: Added coil-compose and coil-network-okhttp to libs.versions.toml and build.gradle.kts.
•
ViewModel: Added isExistingNote property to EditorViewModel to help the UI decide the initial view mode.
•
Database: Stabilized NoteDatabase initialization in app/src/main/kotlin/com/example/notesapp/di/AppModule.kt.
Signed-off-by: Magpiny <magpinyb@gmail.com>1 parent 6038e2f commit bab506a
6 files changed
Lines changed: 22 additions & 6 deletions
File tree
- .idea
- app
- src/main/kotlin/com/example/notesapp
- di
- presentation/editor
- gradle
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
326 | 332 | | |
327 | 333 | | |
328 | 334 | | |
329 | | - | |
330 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
331 | 341 | | |
332 | 342 | | |
333 | 343 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
0 commit comments