-
Notifications
You must be signed in to change notification settings - Fork 521
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 #777 : Add Profile Picture Edit Dialog #801
Conversation
@rt4914 Can you take a look whether the approach is correct or not |
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.
The approach looks great.
Also, I know that you were just looking for suggestion but I still did a full review so that you fix those things in next PR along with full implementation and test cases. Thanks.
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureDialogInterface.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureDialogInterface.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureEditDialogFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureEditDialogFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureEditDialogFragment.kt
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfileProgressFragment.kt
Outdated
Show resolved
Hide resolved
How do i set the presenter for profileprogressheader binding adapter i couldn't any method through which i can achieve this |
@aggarwalpulkit596 I am actually not able to understand what you mean here. |
@rt4914 the thing is that right now my onclick functions are not invoking and that's because i've haven't set the presenter to BindingAdapter of RecyclerView |
Actually your viewmodel should be responsible for handling the clicks instead of presenter. Checkout |
@rt4914 i've pushed some more changes can you please take a look at the implementation |
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.
@aggarwalpulkit596 Great. Now this is perfect implementation. Thanks.
app/src/main/java/org/oppia/app/profileprogress/ProfileProgressActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureClickListener.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfileProgressFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
@rt4914 and for the test do I need to create a separate file for ProfileProgressActivity because there are no test written for that activity |
You can use |
@rt4914 do i need to open the gallery intent as well ? |
Yes, but I believe it should be present in one of the files already. Check |
@rt4914 i've added one test and added intent to open Gallery do i need to do anything else |
Please finish the PR implementation in which ever way you think is correct because going back and forth on a PR on every step is not possible. Please finish the PR completely from your end and then assign it back to me. |
@rt4914 should I create an activity as well to display the profile picture in full screen? |
@rt4914 also there is no option to update the profile picture inside ProfileManagementController |
@rt4914 I've checked avatar change part works fine |
@rt4914 completed the PR |
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.
Overall good great. Suggested some changes.
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivity.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/profileprogress/ProfileProgressFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/profileprogress/ProfileProgressFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/profileprogress/ProfileProgressFragmentTest.kt
Outdated
Show resolved
Hide resolved
@rt4914 i guess this should be the final review |
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.
Suggested few nit changes
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivityViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfilePictureActivityViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/profileprogress/ProfileProgressActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/profileprogress/ProfilePictureActivityTest.kt
Outdated
Show resolved
Hide resolved
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.
Nit Change continuing from previous review.
app/src/main/java/org/oppia/app/profileprogress/ProfileProgressActivityPresenter.kt
Outdated
Show resolved
Hide resolved
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 looks good. Thanks a lot.
Explanation
Fixes #777
Shows a pop-up dialog for Changing/Viewing Profile Picture
Mock Link: https://xd.adobe.com/view/e8aa4198-3940-47f9-514a-f41cc54457f6-9e9b/screen/7fcddeef-4d62-4565-b763-81e89f064a5d/UP-O-Forgot-PIN-Dialog-
Checklist