2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Bug 1796348 - Add notification delegate as a component in apps.

This adds notification delegate as a component in Fenix, Focus and Sample Browser.
This commit is contained in:
mcarare 2023-02-16 20:47:11 +02:00 committed by Ryan VanderMeulen
parent 105c1cdd7c
commit 093e70faad

View File

@ -9,6 +9,7 @@ import android.app.Application
import android.content.Context
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.core.app.NotificationManagerCompat
import com.google.android.play.core.review.ReviewManagerFactory
import mozilla.components.feature.addons.AddonManager
import mozilla.components.feature.addons.amo.AddonCollectionProvider
@ -16,6 +17,7 @@ import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
import mozilla.components.feature.addons.update.DefaultAddonUpdater
import mozilla.components.feature.autofill.AutofillConfiguration
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
import mozilla.components.support.base.android.NotificationsDelegate
import mozilla.components.support.base.worker.Frequency
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config
@ -88,6 +90,14 @@ class Components(private val context: Context) {
)
}
private val notificationManagerCompat = NotificationManagerCompat.from(context)
val notificationsDelegate: NotificationsDelegate by lazyMonitored {
NotificationsDelegate(
notificationManagerCompat,
)
}
val intentProcessors by lazyMonitored {
IntentProcessors(
context,