notes icon indicating copy to clipboard operation
notes copied to clipboard

Theme preference not saved after reboot (defaults to light theme)

Open Ahmad-Nidal opened this issue 8 months ago • 5 comments

When selecting either the Dark or Sepia theme in the app, the preference does not persist after a system reboot. Upon restarting the system (I use Ubuntu Pop!_OS), the app launches using the Light theme instead of the previously chosen one.

Version: 2.3.1 - Installed from Pop!_Shop (Flatpak)

Ahmad-Nidal avatar Apr 21 '25 19:04 Ahmad-Nidal

I think the issue might be because we save these states only when the app detects a closeEvent, but if the app crashes (or forced quit) then it won't be able to detect it. Can you please try quitting by pressing the 3 dots button at the menu bar and then pressing "Quit"? Then see if the state is saved?

nuttyartist avatar Apr 21 '25 19:04 nuttyartist

https://github.com/user-attachments/assets/f03f9c6f-67bb-4bbc-ae29-da185f320e85

After following the steps shown in the video, I logged out and logged back in. However, the app opened in light mode instead of dark mode as expected.

Ahmad-Nidal avatar Apr 21 '25 19:04 Ahmad-Nidal

I understand your instructions now. I've set the theme, closed the side menu, closed the app from the title bar, then quite the app from the top bar of my desktop, and even rebooted, and the theme settings are retained (dark theme).

Thank you for your help. I do think that improving the settings save process would be beneficial, but for now, I'm good. I just need the dark theme option available.

Ahmad-Nidal avatar Apr 21 '25 19:04 Ahmad-Nidal

Image

I think if I did not quit the app from the top bar icon, it still working in the background so logging out or shout down the machine force quit it

Ahmad-Nidal avatar Apr 21 '25 19:04 Ahmad-Nidal

We should use the aboutToQuit signal instead of QCloseEvent to fix this

zjeffer avatar Apr 21 '25 19:04 zjeffer