Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Restore clipboard tracking after clear history #319

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

rsilvr
Copy link
Contributor

@rsilvr rsilvr commented Oct 6, 2024

Description

Debugging the scenario of this issue (trying to copy anything after clearing the history) I would see the output "connection is not opened", which is emitted from the guard clauses in db.ts. It seems the clearHistory function deletes the extension data but doesn't recreate its files or setup the db connection again.

My simplistic solution was calling setupResources, just like the extension startup does. I don't know if is the best approach... but it fixed the issue for me.

Closes #318

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • My commits follow the commit standards of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

@Totto16 Totto16 self-requested a review October 6, 2024 21:27
@Totto16 Totto16 self-assigned this Oct 6, 2024
@Totto16 Totto16 added the bug Something isn't working label Oct 6, 2024
Copy link
Collaborator

@Totto16 Totto16 left a comment

Choose a reason for hiding this comment

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

It is the best approach, since the database needs to be setup before calling start()

Thanks for your contribution ❤️

@Totto16 Totto16 merged commit d240d7d into oae:master Oct 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After clearing the history, the extension completely stops tracking the clipboard
2 participants