Skip to content

Conversation

@alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Aug 27, 2025

  • Tests written, or not not needed

Issue

Multiple offline operations can fail, and users may receive notifications for each failure. If a user attempts to execute the same operation again, the notification may reappear (e.g. #15420 (comment)). In the worker, certain offline operations are canceled and removed from the database. For example, when an operation completes successfully, or if it is a rename or delete operation. In the case of rename or delete operations, conflicts may occur; to prevent overwriting the server’s latest changes, the worker only informs the user instead of executing the action automatically.

Changes

This PR introduces a new notification action for failed offline operations, allowing users to manually remove them if they do not wish to retry.

Additionally, the offline operations worker now uses a dedicated notification channel, giving users the option to manage or disable these notifications independently.

Action New Channel
before after

Note: Adding a more descriptive label for the cancel action, such as "Cancel Offline Operation," could make the notification appear cluttered, as the title already conveys the purpose of the notification.

setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))
setStyle(NotificationCompat.BigTextStyle())
priority = NotificationCompat.PRIORITY_LOW
setChannelId(NotificationUtils.NOTIFICATION_CHANNEL_DOWNLOAD)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This line was overriding the NOTIFICATION_CHANNEL_BACKGROUND_OPERATIONS thus it needs to be removed.

@github-actions
Copy link

Codacy

Lint

TypemasterPR
Warnings4848
Errors1111

SpotBugs

CategoryBaseNew
Bad practice5959
Correctness6262
Dodgy code283283
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3535
Performance4848
Security1818
Total515515

kra-mo

This comment was marked as resolved.

…ion action

Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 force-pushed the feat/better-offline-operation-notification-handling branch from 373a91f to 1c47a34 Compare August 28, 2025 08:49
Signed-off-by: alperozturk <alper_ozturk@proton.me>
@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15451.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@alperozturk96 alperozturk96 merged commit eea9580 into master Sep 1, 2025
18 of 20 checks passed
@alperozturk96 alperozturk96 deleted the feat/better-offline-operation-notification-handling branch September 1, 2025 07:11
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.33

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.

3 participants