Show notifications from workers (#3760)

Fix a crash where workers, in some conditions, should show a notification. These are sent to a dedicated channel with no importance.

Convert NotificationWorker to a CoroutineWorker and remove its use of `runBlocking`.

Fixes #3754
This commit is contained in:
Nik Clayton 2023-06-29 18:37:27 +02:00 committed by GitHub
commit 1f7a5f626d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 158 additions and 84 deletions

View file

@ -371,6 +371,8 @@
<string name="notification_update_description">Notifications when posts you\'ve interacted with are edited</string>
<string name="notification_report_name">Reports</string>
<string name="notification_report_description">Notifications about moderation reports</string>
<string name="notification_listenable_worker_name">Background activity</string>
<string name="notification_listenable_worker_description">Notifications when Tusky is working in the background</string>
<string name="notification_unknown_name">Unknown</string>
<string name="notification_mention_format">%s mentioned you</string>
@ -381,6 +383,8 @@
<item quantity="one">%d new interaction</item>
<item quantity="other">%d new interactions</item>
</plurals>
<string name="notification_notification_worker">Fetching notifications…</string>
<string name="notification_prune_cache">Cache maintenance…</string>
<string name="description_account_locked">Locked Account</string>