-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Deletion button being disabled #1403
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
Deletion button being disabled #1403
Conversation
Solved underline issue in About page
* Improvements in Notification Activity * Update NotificationActivity.java
* added share app feature in About * added share app feature in About * a small fix
Codecov Report
@@ Coverage Diff @@
## master #1403 +/- ##
=========================================
- Coverage 3.3% 3.3% -0.01%
=========================================
Files 128 128
Lines 6837 6844 +7
Branches 669 670 +1
=========================================
Hits 226 226
- Misses 6596 6603 +7
Partials 15 15
Continue to review full report at Codecov.
|
| categoriesLoaded = true; | ||
| categoriesPresent = (categoryNames.size() > 0); | ||
| categoriesPresent = categoryNames.isEmpty(); | ||
| if (!categoriesPresent) { |
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.
Old version checks if categoryNames is not empty, however your fix checks if it is empty.
| delete.setOnClickListener(v -> { | ||
| delete.setEnabled(false); | ||
| delete.setTextColor(getResources().getColor(R.color.deleteButtonLight)); | ||
| AlertDialog.Builder alert = new AlertDialog.Builder(getActivity()); |
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.
Was this a lint issue, or you just wanted to refactor them to increase modularity?
* Added the link in about_upload_to textfield * Merge conflicts resolved * Removed the extra textView
|
It seems like you worked on your other PR #1402 . So there are unrelated changes here. Please remove them, then we can test it. Ideally, there should be only one file changed. |
| } | ||
| } | ||
|
|
||
| private void enableDeleteButton(boolean visibility) { |
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.
Extracted the delete button states into this method to increase readability and reduce method complexity.
|
@gabrielaradu thanks for your contribution, it works if user clicks cancel button however, it disables the button if user dismiss the dialog by clicking outside. Expected behavior is buttons being active if dialog is dismissed. |
|
Great @gabrielaradu , congrats your first time contribution 💃 |
Description
Fixes #1398
Fix state and text color of the deletion button if the operation is aborted. Changed state and text if user clicks "OK" to delete photo.
Tests performed
Tested on {API level & name of device/emulator}, with {build variant, e.g. ProdDebug}.
{Please test your PR at least once before submitting.}
Screenshots showing what changed
{Only for user interface changes, otherwise remove this section. See how to take a screenshot}