-
Notifications
You must be signed in to change notification settings - Fork 528
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 #4294: Profile successfully deleted message #4488
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.
Thanks @mbobiosio! I left one initial thought regarding the approach--please take a look.
fun Context.alertDialog( | ||
@StyleRes style: Int = 0, | ||
dialogBuilder: MaterialAlertDialogBuilder.() -> Unit | ||
) { |
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.
I like where you're going with this. I think my main hesitation is that we've historically preferred using dialog fragments to host alert dialogs since it both gives us more control over the dialog's lifecycle (i.e. we can ensure that the dialog is shown synchronously via a transaction rather than asynchronously) and it provides more flexibility in centralizing the theme & style of the dialog (though I suppose we can do the same here via a central pattern).
Do you think there would be a way to generalize our alert dialogs over to a central dialog fragment, instead? I'm not sure if there's actually a potential for simplification there, but I think that's the approach we'd want to consider (and move away from alert dialogs entirely where they're only created in a single, general dialog fragment).
Hi @mbobiosio, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
@mbobiosio are you still working on this? |
Explanation
Fix #4294
This pull request introduces a MaterialAlertDialog after profile is successfully deleted.
What I have done here is to introduce MaterialAlertDialogBuilder extension to efficiently handle alert dialogs across the app.
On successful response to delete a profile, I show this alert dialog to notify the user that this action was successful.
User is required to click OK to continue.
Issues
I'm still trying to get tests running on my local machine, but I've tested manually and attached screencast. Please review the technical approach
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: