bitfireAT / davx5-ose

DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
https://www.davx5.com
GNU General Public License v3.0
1.25k stars 69 forks source link

Re-creation / rotation of LoginDetails page looses user changes #775

Closed sunkup closed 1 week ago

sunkup commented 2 weeks ago

Might be because LoginScreen is dropped and complete re-compose happens when the screen is rotated, and it calls:

LaunchedEffect(initialLoginInfo) {
    model.initialize(initialLoginInfo)
}

which initializes the login data from initialLoginInfo. However the initialLoginInfo should probably only be taken into account at the very first time, ideally from the Activity (that provides the initial login info).

Originally posted by @rfc2822 in https://github.com/bitfireAT/davx5-ose/pull/772#pullrequestreview-2035397106