mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Cancel may have messages notification from FcmJobService.
This commit is contained in:
@@ -98,7 +98,8 @@ object FcmFetchManager {
|
||||
.notify(NotificationIds.MAY_HAVE_MESSAGES_NOTIFICATION_ID, mayHaveMessagesNotification)
|
||||
}
|
||||
|
||||
private fun cancelMayHaveMessagesNotification(context: Context) {
|
||||
@JvmStatic
|
||||
fun cancelMayHaveMessagesNotification(context: Context) {
|
||||
NotificationManagerCompat.from(context).cancel(NotificationIds.MAY_HAVE_MESSAGES_NOTIFICATION_ID)
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ public class FcmJobService extends JobService {
|
||||
|
||||
if (success) {
|
||||
Log.i(TAG, "Successfully retrieved messages.");
|
||||
FcmFetchManager.cancelMayHaveMessagesNotification(this);
|
||||
jobFinished(params, false);
|
||||
} else {
|
||||
Log.w(TAG, "Failed to retrieve messages. Scheduling a retry.");
|
||||
|
||||
Reference in New Issue
Block a user