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

Mobile: Resolves #10092: Added empty trash option on long pressing the trash folder. #10120

Merged
merged 13 commits into from Mar 14, 2024

Conversation

Sidd-R
Copy link
Contributor

@Sidd-R Sidd-R commented Mar 14, 2024

Summary

Resolves #10092 partially (implemented one of the mentioned features)

On long pressing the trash folder on the side menu, a modal opens with the option of "empty trash". On pressing, another modal would open asking for final confirmation, on confirming it deletes all the folders and notes in the trash permanently.

Rationale

Called the emptyTrash function from lib/services/trash/emptyTrash on pressing the empty trash option.

Demo

empty_trash_demo.mp4

Testing

Tested on Android 13 physical device.

  1. Create a notebook and add some notes/todo to it.
  2. Open the side menu, long press on the folders and press the delete option to delete them.
  3. Now, again open the side menu, long press on the trash folder, a modal will open, select the empty trash option in it.
  4. Then another modal will open asking for final confirmation, on confirming all the folders/notes in trash should be deleted

menuItems.push({
text: _('Empty trash'),
onPress: async () => {
Alert.alert('', _('Are you sure you want to empty the trash?\n\nAll notes and sub-notebooks within trash will be lost forever'), [
Copy link
Owner

Choose a reason for hiding this comment

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

Please use the exact same message as in the desktop app: This will permanently delete all items in the trash. Continue?

onPress: async () => {
Alert.alert('', _('Are you sure you want to empty the trash?\n\nAll notes and sub-notebooks within trash will be lost forever'), [
{
text: _('OK'),
Copy link
Owner

Choose a reason for hiding this comment

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

OK => "Empty trash"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@Sidd-R
Copy link
Contributor Author

Sidd-R commented Mar 14, 2024

@PackElend label me please!

@laurent22
Copy link
Owner

Looks good now, thanks @Sidd-R!

@laurent22 laurent22 merged commit b9eb452 into laurent22:dev Mar 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mobile: Can't empty trash
3 participants