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
Conversation
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'), [ |
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.
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'), |
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.
OK => "Empty trash"
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.
done!
@PackElend label me please! |
Looks good now, thanks @Sidd-R! |
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 fromlib/services/trash/emptyTrash
on pressing the empty trash option.Demo
empty_trash_demo.mp4
Testing
Tested on Android 13 physical device.