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: Bugs with navigation and UI improvements on EditProfile #87

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

omerhabib26
Copy link

Description:

  • Handle onBackPressed
  • Invalidate Done button on data change on EditProfile
  • Add Loader while hitting API

fix: LEARNER-10388

- Handle onBackPressed
- Invalidate `Done` button on data change on EditProfile
- Add Loader while hitting API

fix: LEARNER-10388
Copy link
Collaborator

@k1rill k1rill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question

@@ -163,6 +165,17 @@ class EditProfileFragment : Fragment() {
}
}

private val onBackPressedCallback = object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (viewModel.profileDataChanged) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is very close to lambda in EditProfileScreen

onBackClick = {
    if (it) {
        viewModel.setShowLeaveDialog(true)
    } else {
        viewModel.setShowLeaveDialog(false)
        requireActivity().supportFragmentManager.popBackStackImmediate()
    }
},

maybe we can create a separate method from this?

Copy link

@HamzaIsrar12 HamzaIsrar12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shared the feedback and the patch with fixes last Friday on Slack. 👍🏻

Copy link
Collaborator

@k1rill k1rill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great improvement from the last review

@omerhabib26 omerhabib26 merged commit 21735ed into 2U/develop Jan 29, 2025
3 checks passed
@omerhabib26 omerhabib26 deleted the 2U/omer/LEARNER-10388 branch January 29, 2025 07:10
farhan-arshad-dev pushed a commit that referenced this pull request Jan 29, 2025
fix: Bugs with navigation and UI improvements on EditProfile

- Handle onBackPressed
- Invalidate `Done` button on data change on EditProfile
- Add Loader while hitting API

fix: LEARNER-10388
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.

3 participants