Commit 8db7949
committed
feat: Implement database feature for system messages
Adds a database functionality to the PhotoReasoningScreen's system message section.
Key features:
- A "Database" button on the system message card opens a pop-up.
- The first pop-up lists saved system message entries with alternating dark yellow backgrounds.
- A "New" button allows creating new entries.
- Each entry has a 3-dot menu with a "Delete" option.
- The second pop-up allows creating or editing entries:
- Fields for "Title" (placeholder "App/Task") and "Guide" (placeholder "Write a guide...").
- Text fields have a white background; the pop-up has a dark yellow background.
- A "Save" button saves the entry.
- Entries are stored in SharedPreferences using JSON serialization.
- Basic validation for empty fields and duplicate titles is included.
- Styling (rounded buttons, pop-up sizes, colors) implemented as per requirements.
Fixes compilation errors by adding kotlinx-serialization dependency and plugin to app/build.gradle.kts.1 parent 20d2b54 commit 8db7949
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
0 commit comments