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

2528: Do not remove notifications on general resume #3312

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

Lakoja
Copy link
Collaborator

@Lakoja Lakoja commented Feb 12, 2023

Largely closes #2528

@@ -117,7 +117,8 @@ class SendStatusBroadcastReceiver : BroadcastReceiver() {
builder.setCategory(NotificationCompat.CATEGORY_SOCIAL)
builder.setOnlyAlertOnce(true)

notificationManager.notify(notificationId, builder.build())
// There is a separate "I am sending" notification, so simply remove the handled one.
notificationManager.cancel(notificationId)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder if there are more locations (special notifications) like this where notifications would not be removed now.

Upon creation (NotificationHelper#make) there are however only two special cases (compose and quick reply).

@@ -667,10 +666,6 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje

onTabSelectedListener = object : OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab) {
if (tab.position == notificationTabPosition) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to NotificationsFragment.

@connyduck connyduck merged commit 4ab305f into tuskyapp:develop Feb 25, 2023
@Lakoja Lakoja deleted the 2528-notifications-only-unread branch March 20, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically remove Android notifications only when read
2 participants