Conversation
…ger on link selection
…nd refactor API documentation layout
There was a problem hiding this comment.
Pull Request Overview
This PR adds thumbnail support to the Deepr application, allowing users to fetch and display images associated with saved links. The implementation includes database schema updates, UI components for displaying thumbnails, and a user preference to enable/disable the thumbnail feature.
Key Changes:
- Added a
thumbnailcolumn to the database schema with appropriate migration - Updated UI to fetch metadata including thumbnail images and display them in list items and dialogs
- Added a settings toggle to enable/disable thumbnail display
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/sqldelight/migrations/6.sqm | Adds database migration to include thumbnail column |
| app/src/main/sqldelight/com/yogeshpaliyal/deepr/Deepr.sq | Updates database schema and queries to support thumbnail field |
| app/src/main/java/com/yogeshpaliyal/deepr/viewmodel/AccountViewModel.kt | Adds thumbnail parameters to insert/update methods and preference management |
| app/src/main/java/com/yogeshpaliyal/deepr/util/Constants.kt | Adds THUMBNAIL constant for CSV headers |
| app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/SaveCompleteDialog.kt | Updates helper function to include thumbnail parameter |
| app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/HomeBottomContent.kt | Implements thumbnail fetching and display in the save dialog |
| app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/Home.kt | Passes thumbnail enable state through component hierarchy |
| app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/DeeprItem.kt | Displays thumbnails in the list item view |
| app/src/main/java/com/yogeshpaliyal/deepr/ui/screens/Settings.kt | Adds settings UI for thumbnail enable/disable toggle |
| app/src/main/java/com/yogeshpaliyal/deepr/preference/AppPreferenceDataStore.kt | Implements preference storage for thumbnail feature |
| app/src/main/java/com/yogeshpaliyal/deepr/backup/ImportRepositoryImpl.kt | Updates CSV import to handle thumbnail data |
| app/src/main/java/com/yogeshpaliyal/deepr/backup/CsvWriter.kt | Updates CSV export to include thumbnail data |
| modifier = | ||
| Modifier | ||
| .fillMaxWidth() | ||
| .aspectRatio(1.91f) |
There was a problem hiding this comment.
The magic number 1.91f for aspect ratio should be extracted as a named constant (e.g., THUMBNAIL_ASPECT_RATIO) to improve maintainability and ensure consistency across the codebase where thumbnails are displayed.
| modifier = | ||
| Modifier | ||
| .fillMaxWidth() | ||
| .aspectRatio(1.91f) |
There was a problem hiding this comment.
The magic number 1.91f is duplicated from HomeBottomContent.kt. Extract this as a shared constant to maintain consistency and simplify future updates to the thumbnail aspect ratio.
fixes #222