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

Open
wants to merge 2 commits into
base: 2U/develop
Choose a base branch
from

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. 👍🏻

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