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: updating "Delete All Data" operation #2185

Merged
merged 3 commits into from
Apr 3, 2021

Conversation

KushMehta1511
Copy link
Contributor

The code has been modified to check whether any log is present while deleting and if no logs are present then the "Delete All Data" menu option shows a snackbar "Nothing To Delete".

Fixes #2184

Changes:
In the onOptionsItemSelected function under the category of R.id.delete_all an if condition is added to check whether the size of LocalDataLog is greater than 0 or not. If it is 0 then the "Delete All Data" displays a snackbar "Nothing to delete", otherwise functions normally as before.

Screenshot/s for the changes:
Before:

Delete-all-items-doing-nothing-menu-item.mp4

After:
Nothing to Delete

Checklist:

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing:

app-fdroid-debug.zip

The code has been modified to check whether any log is present while deleting and if no logs are present then the "Delete All Data" menu option shows a snackbar "Nothing To Delete".
@CloudyPadmal CloudyPadmal added the Enhancement Improvement to an existing feature label Apr 1, 2021
@CloudyPadmal CloudyPadmal changed the title Updating "Delete All Data" operation when zero log items. fix: updating "Delete All Data" operation Apr 1, 2021
KushMehta1511 and others added 2 commits April 1, 2021 14:51
Co-authored-by: Padmal <CloudyPadmal@users.noreply.github.com>
Co-authored-by: Padmal <CloudyPadmal@users.noreply.github.com>
@CloudyPadmal CloudyPadmal merged commit 47fbc40 into fossasia:development Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Delete All Data" button doing nothing after all logs are deleted.
2 participants