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: Remove reminder action from trash #45227

Merged
merged 2 commits into from May 14, 2024
Merged

fix: Remove reminder action from trash #45227

merged 2 commits into from May 14, 2024

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented May 7, 2024

Summary

  • Fix invalid set reminder action displayed on trash files
  • Deleted files should not have reminders and any pending reminders on files that get deleted are automatically removed

Checklist

@Pytal Pytal added bug 3. to review Waiting for reviews labels May 7, 2024
@Pytal Pytal added this to the Nextcloud 30 milestone May 7, 2024
@Pytal Pytal self-assigned this May 7, 2024
@Pytal Pytal requested a review from skjnldsv as a code owner May 7, 2024 22:23
@Pytal Pytal enabled auto-merge May 7, 2024 22:24
@Pytal Pytal marked this pull request as draft May 7, 2024 22:24
auto-merge was automatically disabled May 7, 2024 22:24

Pull request was converted to draft

@Pytal Pytal marked this pull request as ready for review May 7, 2024 22:45
@Pytal Pytal enabled auto-merge May 7, 2024 22:46
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Should we also remove reminders from the DB when a file gets deleted?

@Pytal
Copy link
Member Author

Pytal commented May 13, 2024

Should we also remove reminders from the DB when a file gets deleted?

Works this way already actually https://github.com/nextcloud/server/blob/master/apps/files_reminders/lib/Listener/NodeDeletedListener.php

@@ -32,7 +35,10 @@ export const action = new FileAction({
title: () => t('files_reminders', 'Set reminder at custom date & time'),
iconSvgInline: () => CalendarClockSvg,

enabled: () => true,
enabled: (_nodes: Node[], view: View) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe future APIs should just have context objects to allow to only destructure the needed property

Pytal added 2 commits May 14, 2024 10:47
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
@Pytal Pytal merged commit 2b2a866 into master May 14, 2024
104 checks passed
@Pytal Pytal deleted the fix/set-reminder-trash branch May 14, 2024 18:12
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.

None yet

5 participants