Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with temporary login #4562

Merged
merged 1 commit into from
Sep 16, 2022
Merged

Fix issues with temporary login #4562

merged 1 commit into from
Sep 16, 2022

Conversation

charlag
Copy link
Contributor

@charlag charlag commented Sep 7, 2022

The first issue is attempting to get last update time in OfflineIndicatorViewModel. It was trying to wait for partial login but unfortunately temporary login is also partial login.

We didn't want to just return null in this case as it might get interpreted incorrectly and instead we returned a sum type with the exact case and ignore uninitialized storage in this case.

The other issue was with LoginController and LoginListener not properly resetting themselves on logout (e.g. after temporary login) and giving incorrect results.

The third issue was with PostLoginActions initializing MailModel for temporary login. If a real login into another account is attempted afterwards it would lead to more errors.

To fully solve the problem we should rethink how temporary login affects the rest of the app and perhaps skip most of the things that happen during normal login.

fix #4559

The first issue is attempting to get last update time in
OfflineIndicatorViewModel. It was trying to wait for partial login but
unfortunately temporary login is also partial login.

We didn't want to just return null in this case as it might get
interpreted incorrectly and instead we returned a sum type with the
exact case and ignore uninitialized storage in this case.

The other issue was with LoginController and LoginListener not properly
resetting themselves on logout (e.g. after temporary login) and giving
incorrect results.

The third issue was with PostLoginActions initializing MailModel for
temporary login. If a real login into another account is attempted
afterwards it would lead to more errors.

To fully solve the problem we should rethink how temporary login affects
the rest of the app and perhaps skip most of the things that happen
during normal login.

fix #4559
src/api/main/LoginController.ts Show resolved Hide resolved
@charlag charlag merged commit dd991fe into master Sep 16, 2022
@charlag charlag deleted the fix-signup-error branch September 16, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProgrammingError at signup for paid subscription in desktop client
2 participants