equeim/tremotesf2

Remembering columns and settings

Closed this issue · 8 comments

I version 2.4.0 latest the program doesn't remember columns you enabled and disabled as well as what filtering you had of the status.

There was a issue about column with as issue #40 which was closed but my experience is once the system restarts you loose your column and window settings.

For now I don't customise columns and not too keen using the program if the window is resizing on every load and it won't remember the status filter I selected last which is on Downloading as I have many qued torrents but only download a few at a time.

equeim commented

Do you run Tremotesf on Windows?

Yep I do running Windows 11

equeim commented

Hmm.

  1. Does this happen if you close and relaunch Tremotesf normally?
  2. Does this happen if you reboot/turn off your PC while Tremotesf is running and launch it again after boot?

For me, this occurred after tsremotesf crashed or closed unexpectedly. This is on manjaro (arch). It seems like it resets itself fully when this happens.

equeim commented

Currently it saves settings only on shutdown (in class destructors), until that they kept only in RAM (not very smart I know). It seems that on Windows the process is killed without proper shutdown when OS itself is shutting down, unlike on Linux. While it's still possible to intercept OS shutdown events it won't be easy it with the current logic for saving settings so I think I will just rewrite it to save settings to disk immediately after they are changed. This will also protect against crashes (unless crash happened while writing to disk but there is nothing we can do in that case).

I think I will just rewrite it to save settings to disk immediately after they are changed. This will also protect against crashes (unless crash happened while writing to disk but there is nothing we can do in that case).

That's gonna be a great move!

I haven't gotten around to checking myself but great move agreed.

Should be fixed now.