-
Notifications
You must be signed in to change notification settings - Fork 67
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
Oauth updates #1642
base: develop
Are you sure you want to change the base?
Oauth updates #1642
Conversation
1c7bc51
to
1c40cb3
Compare
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.
Hey, I just wanted to say, nice going on this!! I know it was a beast to get working, but in the end the code doesn't seem too crazy!
I left a few comments, mostly stylistic things. I haven't actually tested the flow yet but I would love to!
|
||
await showBlockingInputDialog<String>( | ||
context: context, | ||
title: "Sign Up", |
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.
Remember to put these strings in the localization file!
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.
Which file do I update to do that?
} else if (state.status == AuthStatus.oauthContentWarning) { | ||
bool acceptedContentWarning = false; | ||
|
||
await showThunderDialog<void>( |
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.
Is this code similar enough to the existing content warning code that it could be refactored into a reusable method?
@@ -527,3 +527,78 @@ void showInputDialog<T>({ | |||
}), | |||
); | |||
} | |||
|
|||
/// Shows a dialog which takes input and offers suggestions | |||
Future<String?> showBlockingInputDialog<T>({ |
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.
This seems pretty similar to showInputDialog
. Is there any way to combine these?
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.
showInputDialog
doesn't block, so it didn't work to display the dialog where you enter your username on your first oauth login. So I modified it to create showBlockingInputDialog
. So yea, they are pretty similar. I think showInputDialog
is used in one other place in the code, maybe we could make that one blocking also?
Co-authored-by: William <sirwilliamthefirst@users.noreply.github.com>
Co-authored-by: William <sirwilliamthefirst@users.noreply.github.com>
…ng on getting thunderapp.dev callback working
Oauth updates.
This PR depends on thunder-app/lemmy_api_client#28
This can be tested against the lemmy instance at hopandzip.com which I deployed with the lemmy:main