QTodoTxt2 icon indicating copy to clipboard operation
QTodoTxt2 copied to clipboard

Make dialog about an externally modified file optional

Open licquia opened this issue 6 years ago • 5 comments

I use QTodoTxt2 with other tools (Android app, command-line tool, recurring task plugin), and every time I do things with one of these tools, QTodoTxt2 pops up a notice asking if I want to reload. The answer, for me, is always "yes", and to be honest, I'm not sure why I'd ever say "no".

Could we make the notice optional, and just have it reload on external updates automatically?

licquia avatar May 14 '18 15:05 licquia

The worst case is to have a file corruption and reload the corrupted file. But we could make this an option..

oroulet avatar May 15 '18 20:05 oroulet

Well, it just corrupted my todo.txt file because of the dialog.

What happened was that the dialog popped up for me, but the program got confused somehow, and the confirmation dialog was not refreshing or responding. To clear it, I had to kill qtodotxt. When I did this, it decided to write something to todo.txt, as my other clients all updated.

Upon checking, I found that a recurring task I've configured to be automatically added once a week had been lost. This was easy to fix, but imagine if it had been a task entered on my Android app.

licquia avatar May 28 '18 13:05 licquia

I've filed pull request #128 that fixes this issue for me.

licquia avatar May 19 '19 19:05 licquia

I've been trying to track down why my todo.txt is reverting to a previous version using syncthing with QTodoTxt, QTodoTxt2 on Windows and Linux and Simpletask on Android. I suspect this might be caused by the same issue, and look forward to this being merged. Thanks @licquia!

jonniestuefer avatar Jun 19 '19 07:06 jonniestuefer

@jonniestuefer You're welcome. If you'd like to try a preview, my fork is here:

https://github.com/licquia/QTodoTxt2/tree/autoreload

licquia avatar Jun 19 '19 15:06 licquia