mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
Bug 1817432 - Always setup notification workers even if marketing channel has not been created
(cherry picked from commit 9aecd047d2b03973e4fa15abe0ada48901895250)
This commit is contained in:
parent
4ca35c6cd0
commit
4ce0b26bab
@ -90,7 +90,6 @@ import org.mozilla.fenix.ext.areNotificationsEnabledSafe
|
|||||||
import org.mozilla.fenix.ext.breadcrumb
|
import org.mozilla.fenix.ext.breadcrumb
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.hasTopDestination
|
import org.mozilla.fenix.ext.hasTopDestination
|
||||||
import org.mozilla.fenix.ext.isNotificationChannelEnabled
|
|
||||||
import org.mozilla.fenix.ext.nav
|
import org.mozilla.fenix.ext.nav
|
||||||
import org.mozilla.fenix.ext.setNavigationIcon
|
import org.mozilla.fenix.ext.setNavigationIcon
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
@ -112,7 +111,6 @@ import org.mozilla.fenix.library.recentlyclosed.RecentlyClosedFragmentDirections
|
|||||||
import org.mozilla.fenix.nimbus.FxNimbus
|
import org.mozilla.fenix.nimbus.FxNimbus
|
||||||
import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker
|
import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker
|
||||||
import org.mozilla.fenix.onboarding.FenixOnboarding
|
import org.mozilla.fenix.onboarding.FenixOnboarding
|
||||||
import org.mozilla.fenix.onboarding.MARKETING_CHANNEL_ID
|
|
||||||
import org.mozilla.fenix.onboarding.ReEngagementNotificationWorker
|
import org.mozilla.fenix.onboarding.ReEngagementNotificationWorker
|
||||||
import org.mozilla.fenix.onboarding.ensureMarketingChannelExists
|
import org.mozilla.fenix.onboarding.ensureMarketingChannelExists
|
||||||
import org.mozilla.fenix.perf.MarkersActivityLifecycleCallbacks
|
import org.mozilla.fenix.perf.MarkersActivityLifecycleCallbacks
|
||||||
@ -431,15 +429,9 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||||||
// that we should not rely on the application being killed between user sessions.
|
// that we should not rely on the application being killed between user sessions.
|
||||||
components.appStore.dispatch(AppAction.ResumedMetricsAction)
|
components.appStore.dispatch(AppAction.ResumedMetricsAction)
|
||||||
|
|
||||||
with(applicationContext) {
|
DefaultBrowserNotificationWorker.setDefaultBrowserNotificationIfNeeded(applicationContext)
|
||||||
// Only set up Workers if notifications are enabled
|
ReEngagementNotificationWorker.setReEngagementNotificationIfNeeded(applicationContext)
|
||||||
val notificationManagerCompat = NotificationManagerCompat.from(this)
|
MessageNotificationWorker.setMessageNotificationWorker(applicationContext)
|
||||||
if (notificationManagerCompat.isNotificationChannelEnabled(MARKETING_CHANNEL_ID)) {
|
|
||||||
DefaultBrowserNotificationWorker.setDefaultBrowserNotificationIfNeeded(this)
|
|
||||||
ReEngagementNotificationWorker.setReEngagementNotificationIfNeeded(this)
|
|
||||||
MessageNotificationWorker.setMessageNotificationWorker(this)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This was done in order to refresh search engines when app is running in background
|
// This was done in order to refresh search engines when app is running in background
|
||||||
|
Loading…
Reference in New Issue
Block a user