Skip to content

Add reset opened count option in the 3 dots menu#158

Merged
yogeshpaliyal merged 3 commits intomasterfrom
copilot/add-reset-opened-count
Oct 9, 2025
Merged

Add reset opened count option in the 3 dots menu#158
yogeshpaliyal merged 3 commits intomasterfrom
copilot/add-reset-opened-count

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 9, 2025

Overview

This PR implements a new feature that allows users to reset the opened count for individual links directly from the 3 dots menu on each link item.

Changes

Database Layer

  • Added resetOpenedCount SQL query to set the openedCount field to 0 for a specific link

ViewModel

  • Implemented resetOpenedCount(id: Long) function in AccountViewModel to handle the reset operation

UI Components

  • Added "Reset opened count" menu item to the dropdown menu in DeeprItem
  • Positioned between "Edit" and "Delete" options for logical flow
  • Used the Refresh icon from Tabler Icons to visually represent the reset action
  • Added callback parameter onResetOpenedCountClick to properly wire the action through the component hierarchy

Resources

  • Added reset_opened_count string resource for localization support

User Experience

When a user taps the 3 dots menu on any link and selects "Reset opened count":

  1. The opened count for that link is immediately reset to 0
  2. A toast notification confirms the action with "Opened count reset"
  3. The updated count is reflected in the UI

Implementation Notes

  • Follows existing architectural patterns in the codebase
  • Uses the established ViewModel and repository pattern
  • Minimal, surgical changes to existing code
  • Maintains consistency with other menu actions (Edit, Delete, etc.)

Closes #issue_number

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
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>Add reset opened count in the 3 dots menu</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #104

💡 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.

Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Copilot AI changed the title [WIP] Add reset opened count in the 3 dots menu Add reset opened count option in the 3 dots menu Oct 9, 2025
Copilot AI requested a review from yogeshpaliyal October 9, 2025 02:33
@yogeshpaliyal yogeshpaliyal marked this pull request as ready for review October 9, 2025 03:11
@yogeshpaliyal yogeshpaliyal merged commit 1d5744a into master Oct 9, 2025
1 check passed
@yogeshpaliyal yogeshpaliyal deleted the copilot/add-reset-opened-count branch October 9, 2025 05:22
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.

Add reset opened count in the 3 dots menu

2 participants