fun tryToShowReEngagementDialog( settings: Settings, status: CookieBannerHandlingStatus, navController: NavController, ) { if (status == CookieBannerHandlingStatus.DETECTED && settings.shouldCookieBannerReEngagementDialog() ) { settings.lastInteractionWithReEngageCookieBannerDialogInMs = System.currentTimeMillis() settings.cookieBannerDetectedPreviously = true val directions = BrowserFragmentDirections.actionBrowserFragmentToCookieBannerDialogFragment() navController.nav(R.id.browserFragment, directions) } }
Tries to show the re-engagement cookie banner dialog, when the right conditions are met, o otherwise the dialog won't show.