-
Notifications
You must be signed in to change notification settings - Fork 68
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 issue after deleting non-active account #765
Fix issue after deleting non-active account #765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question:
await Future.delayed(const Duration(milliseconds: 1500)
Is there a reason for the delay? I'm assuming its to wait for the accounts to switch/fetch information but maybe there's a better way to handle this aside from a static value? If we are keeping the delay, then it would be good to add some feedback to the user to let them know something is happening/has happened!
Also, on an unrelated note, I noticed that the selected account colour doesn't show up well when its in dark mode, but this can be for another PR!
Good question! First I'll just mention that this file already had a similar delay added in #677, but I know that was such a big PR it was probably overlooked.
But even more importantly, I'm really just copying some code that you added a while back. thunder/lib/thunder/pages/thunder_page.dart Lines 195 to 196 in 274f6fd
While I never really looked into this, based on the comment it seems, as you alluded to, that there is some fetching/loading that we have to wait for before proceeding. Without this, calling
Good point! In the profile switcher modal, can you think of a good place to add a spinner?
I think someone mentioned this in Matrix and said that some themes look better than others. I think I probably just need to increase the opacity. |
Yeah, I think maybe we can shorten the delay a bit more so that it feels "quicker". I think shortening the duration and adding the loading indicator should be good enough for now!
I think we can add a spinner in place of the trash icon when we remove an account!
It might just not be applying the proper colour? At least when I switch between light and dark, the selected colour is the same. I'll post a screenshot to show you what I mean! |
Nice, it looks good now! Thanks :D |
Pull Request Description
This PR fixes an issue with the new account switcher where deleting a non-active accont could cause the current active account to deactivate, and cause us to revert to an unlisted anonymous instance.
Issue Being Fixed
Issue Number: N/A
Screenshots / Recordings
Before
account-switcher-bug-before.mp4
After
account-switcher-bug-after.mp4
Checklist
semanticLabel
s where applicable for accessibility? -- N/A