Fix for loosing password on restart (KDE)

Description

Whenever you restart a flatpak mailspring app it looses all the passwords.

To Reproduce…

Steps to reproduce the behavior:

  1. Setup any account
  2. Quit the app
  3. Open the app
  4. Passwords are lost and you have to reset them again

Expected Behavior

Passwords are saved properly and are not lost on restart.

Screenshots

Setup

  • OS and Version: Linux Kinoite 40
    • Installation Method: Flatpak
  • Mailspring Version: 1.13.3

Additional Context

The fix is pretty simple - Flatpak has to request additional permissions for Session Bus Policy.

This can be fixed manually by adding additional org.kde.kwalletd5 talk permission:

AND patching .desktop file to force --password-store=kwallet5

I suspect this permission can be requested automatically by flatpak app config + better detection of password store in KDE 6?

If this gets fixed, I might come back to Mailspring. I did like it, just couldn’t spend the time re-logging in constantly.