thielepaul / photoprism-mobile

Flutter App for PhotoPrism
GNU General Public License v3.0
898 stars 69 forks source link

The "PhotoPrism" authentication flag is not saved #135

Closed xxxserxxx closed 2 years ago

xxxserxxx commented 2 years ago

The toggle for the "PhotoPrism" authentication method (on/off) is not persisted between app restarts. The credentials themselves are saved, but the toggle must be re-enabled between restarts. This prevents PhotoPrism Mobile from syncing in the background.

To replicate

  1. Start PhotoPrism mobile
  2. Go to Settings
  3. Go to Authentication
  4. Enable "PhotoPrism" and enter credentials
  5. Save the settings
  6. Back out to the main (gallery) screen
  7. Exit app

Cause the app to stop. This issue presents itself if Android puts the app to sleep on its own; however, to force the behavior, either:

  1. Go to the running app list overview (square home button, on my phone)
  2. Swipe up on PhotoPrism

or

  1. Go to the Android system settings and the Apps section
  2. Find PhotoPrism and select it
  3. Click "Force Stop"

After Android's stopped PhotoPrism,

  1. Start PhotoPrism Mobile again
  2. Go to Settings
  3. Go to Authentication
  4. All authentication methods will be disabled

At this point, if PhotoPrism Authentication is re-enabled, the credentials are there and it works fine for the session. If the app stops for any reason, the Authentication flag will be disabled again.

thielepaul commented 2 years ago

Please try if it is working with the latest version

xxxserxxx commented 2 years ago

Perfect! Thank you for the quick fix!