Skip to content

Conversation

@alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jan 13, 2026

  • Tests written, or not not needed

Issue

trySetForeground() called before ensuring conditions, this causing to see multiple notifications. Conditions need to be checked first.

Signed-off-by: alperozturk96 <[email protected]>
@alperozturk96 alperozturk96 force-pushed the fix/show-notification-only-if-conditions-are-met-for-auto-upload branch from f5f393f to 7993447 Compare January 13, 2026 11:11
return getForegroundInfo(notification)
}

fun getForegroundInfo(notification: Notification): ForegroundInfo =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since this is needed for other workers, we can move this logic to the WorkerNotificationManager

@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.35

@github-actions
Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link

Codacy

SpotBugs

CategoryBaseNew
Bad practice4343
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability33
Multithreaded correctness3434
Performance4444
Security1818
Total481481

@alperozturk96 alperozturk96 added this to the Nextcloud App 3.35.0 milestone Jan 14, 2026
Copy link
Collaborator

@ZetaTom ZetaTom left a comment

Choose a reason for hiding this comment

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

Tested on AOSP Android 11 using a Pixel 2 emulator. Works while app is in foreground and background.

@alperozturk96 alperozturk96 merged commit 652b8e4 into master Jan 14, 2026
18 of 23 checks passed
@alperozturk96 alperozturk96 deleted the fix/show-notification-only-if-conditions-are-met-for-auto-upload branch January 14, 2026 12:55
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