thunderbird / thunderbird/thunderbird-android
Can't enable delete from notification button in settings
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
Checklist
- I have used the search function to see if someone else has already submitted the same bug report.
- I will describe the problem with as much detail as possible.
App
K-9 Mail
App version
19.2
Where did you get the app from?
F-Droid
Android version
LineageOS 22.2
Device model
Pixel-3
Steps to reproduce
This is a problem that only occurs if you have the config database setting notificationQuickDelete set to NEVER. Unfortunately, it is impossible to change the setting of this is the current version of K-9 because the preference manager that updates it is only in the thunderbird code. This means that if the setting is inherited from upgrade it becomes impossible to make the delete button appear in notifications because the code conditions the ability to display delete on this being not set to NEVER:
```
private fun isDeleteActionEnabled(): Boolean {
return notificationSettings.notificationQuickDeleteBehaviour != NotificationQuickDelete.NEVER
}
If you get into this problem the only way to make the delete button appear is to edit the preferences_storage file manually to change it to an acceptable value like ALWAYS.
### Expected behavior
There should be some way to enable the delete button from K9 settings.
Probably the best way of fixing this is to remove the isDeleteActionEnabled() function and simply allow delete to appear unconditionally if the user selects it in the 'Notification actions' settings.
The notificationQuickDelete config item also appears to do nothing else other than disable the delete button in notifications, so perhaps it should be removed as well?
### Actual behavior
If you have inherited notificationQuickDelete set to NEVER on upgrade, you can never enable the delete button in K9 mail notifications
### Logs
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at isDeleteActionEnabled() and trace notificationSettings.notificationQuickDeleteBehaviour from the Notification actions settings. Check how the inherited notificationQuickDelete value affects the delete action, then verify that the setting can enable delete in notifications for affected upgrades. The payload names no source file or test, so locate the relevant notification settings entry point first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100