oae / gnome-shell-pano

Next-gen Clipboard Manager for Gnome Shell
https://extensions.gnome.org/extension/5278/pano/
GNU General Public License v2.0
1.13k stars 59 forks source link

fix: Restore clipboard tracking after clear history #319

Closed rsilvr closed 1 month ago

rsilvr commented 1 month ago

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

Checklist