Skip to content

Add Thumbnail support#232

Merged
yogeshpaliyal merged 5 commits intomasterfrom
minorEnhancements
Oct 22, 2025
Merged

Add Thumbnail support#232
yogeshpaliyal merged 5 commits intomasterfrom
minorEnhancements

Conversation

@yogeshpaliyal
Copy link
Copy Markdown
Owner

@yogeshpaliyal yogeshpaliyal commented Oct 22, 2025

fixes #222

@yogeshpaliyal yogeshpaliyal changed the title Minor enhancements Add Thumbnail support Oct 22, 2025
@yogeshpaliyal yogeshpaliyal requested a review from Copilot October 22, 2025 17:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thumbnail column 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)
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
modifier =
Modifier
.fillMaxWidth()
.aspectRatio(1.91f)
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@yogeshpaliyal yogeshpaliyal merged commit 1833bf5 into master Oct 22, 2025
1 check passed
@yogeshpaliyal yogeshpaliyal deleted the minorEnhancements branch October 22, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-fetch thumbnails

2 participants