Add favourites feature with filtering and toggle functionality#171
Merged
yogeshpaliyal merged 7 commits intomasterfrom Oct 10, 2025
Merged
Add favourites feature with filtering and toggle functionality#171yogeshpaliyal merged 7 commits intomasterfrom
yogeshpaliyal merged 7 commits intomasterfrom
Conversation
Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add favourites feature with toggle option
Add favourites feature with filtering and toggle functionality
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a complete favourites feature for Deepr, allowing users to mark links as favourites and filter them separately. This addresses #[issue_number] which requested adding favourites functionality to the app.
Changes Made
Database Layer
isFavouritecolumn to the Deepr table (INTEGER, default 0)toggleFavouriteSQL query to toggle favourite status using a CASE statementsetFavouriteSQL query for explicit favourite status settinggetLinksAndTagsquery to include theisFavouritefield and support filtering by favourite status4.sqmto ensure smooth upgrades for existing usersViewModel Layer
favouriteFilterStateFlow to track the current filter state (-1 = All, 1 = Favourites)setFavouriteFilter(filter: Int)method to update the filtertoggleFavourite(id: Long)method to toggle favourite statusaccountsquery to combine favourite filtering with existing search, sort, and tag filtersUI Layer
Localization
favourites,add_to_favourites, andremove_from_favouritesHow It Works
Users can now:
The favourite status persists across app restarts and integrates seamlessly with existing search, sort, and tag filtering capabilities.
Technical Details
? = -1 OR Deepr.isFavourite = ?Files Changed
app/src/main/sqldelight/com/yogeshpaliyal/deepr/Deepr.sq- Schema and queriesapp/src/main/sqldelight/migrations/4.sqm- Database migration (new file)app/src/main/java/com/yogeshpaliyal/deepr/viewmodel/AccountViewModel.kt- Filter logicapp/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/Home.kt- Filter tabs UIapp/src/main/java/com/yogeshpaliyal/deepr/ui/screens/home/DeeprItem.kt- Toggle menu itemapp/src/main/res/values/strings.xml- String resourcesTotal Changes: +111 lines, -7 lines across 6 files
Testing Notes
The implementation follows all existing architectural patterns in the codebase. Manual testing should verify:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/agents/gradle-instrumentation-agent-8.13.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.13(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #170
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.