Cleans up nav_graph.xml (#9829)

* For #9751 - Cleans up homeFragment directions

* For #9751 - Uses global actions for fragments not owned by homeFragment

* For #9751 - Cleans up SearchFragment directions

* For #9751 - Removes settings action from DeleteBrowsingDataFragment

* For #9751 - Removes browser action from SettingsFragment

* For #9751 - Adds ManagePhoneFeature global action

* For #9751 - Clean up unused deletebrowsingfragment actions

* For #9751 - Cleans Up HistoryFragment actions

* For #9751 - Removes Home -> Search action

* For #9751 - Removes the Bookmark -> Browser action

* For #9751 - Cleans up bookmark fragment actions

* For #9751 - Cleans up actions from ShareController

* For #9751 - Removes defaultBrowserFragment to browserFragment action

* For #9751 - Removes about -> browser action

* For #9751 - Adds global action to TrackingProtectionFragment

* For #9751 - Removes exception -> browser action

* For #9751 - Removes login -> browser action

* For #9751 - Fixes LoginFragment directions

* For #9751 - Removes ExternalAppBrowser directions

* for #9751 - Cleans up actions

* For #9751 - Fixes unit tests

* For #9751 - Addresses nits in PR
fennec/production
Jeff Boek 5 years ago committed by GitHub
parent eace991859
commit 4cbb9aebaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,7 @@ import androidx.navigation.NavDirections
* @property destinationId fragment ID of the fragment being navigated to * @property destinationId fragment ID of the fragment being navigated to
*/ */
enum class GlobalDirections(val navDirections: NavDirections, val destinationId: Int) { enum class GlobalDirections(val navDirections: NavDirections, val destinationId: Int) {
Home(NavGraphDirections.actionGlobalHomeFragment(), R.id.homeFragment), Home(NavGraphDirections.actionGlobalHome(), R.id.homeFragment),
Settings( Settings(
NavGraphDirections.actionGlobalSettingsFragment(), NavGraphDirections.actionGlobalSettingsFragment(),
R.id.settingsFragment R.id.settingsFragment

@ -328,31 +328,23 @@ open class HomeActivity : LocaleAwareAppCompatActivity() {
BrowserDirection.FromHome -> BrowserDirection.FromHome ->
HomeFragmentDirections.actionHomeFragmentToBrowserFragment(customTabSessionId, true) HomeFragmentDirections.actionHomeFragmentToBrowserFragment(customTabSessionId, true)
BrowserDirection.FromSearch -> BrowserDirection.FromSearch ->
SearchFragmentDirections.actionSearchFragmentToBrowserFragment(customTabSessionId) SearchFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromSettings -> BrowserDirection.FromSettings ->
SettingsFragmentDirections.actionSettingsFragmentToBrowserFragment(customTabSessionId) SettingsFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromBookmarks -> BrowserDirection.FromBookmarks ->
BookmarkFragmentDirections.actionBookmarkFragmentToBrowserFragment(customTabSessionId) BookmarkFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromHistory -> BrowserDirection.FromHistory ->
HistoryFragmentDirections.actionHistoryFragmentToBrowserFragment(customTabSessionId) HistoryFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromExceptions -> BrowserDirection.FromExceptions ->
ExceptionsFragmentDirections.actionExceptionsFragmentToBrowserFragment( ExceptionsFragmentDirections.actionGlobalBrowser(customTabSessionId)
customTabSessionId
)
BrowserDirection.FromAbout -> BrowserDirection.FromAbout ->
AboutFragmentDirections.actionAboutFragmentToBrowserFragment(customTabSessionId) AboutFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromTrackingProtection -> BrowserDirection.FromTrackingProtection ->
TrackingProtectionFragmentDirections.actionTrackingProtectionFragmentToBrowserFragment( TrackingProtectionFragmentDirections.actionGlobalBrowser(customTabSessionId)
customTabSessionId
)
BrowserDirection.FromDefaultBrowserSettingsFragment -> BrowserDirection.FromDefaultBrowserSettingsFragment ->
DefaultBrowserSettingsFragmentDirections.actionDefaultBrowserSettingsFragmentToBrowserFragment( DefaultBrowserSettingsFragmentDirections.actionGlobalBrowser(customTabSessionId)
customTabSessionId
)
BrowserDirection.FromSavedLoginsFragment -> BrowserDirection.FromSavedLoginsFragment ->
SavedLoginsFragmentDirections.actionSavedLoginsFragmentToBrowserFragment( SavedLoginsFragmentDirections.actionGlobalBrowser(customTabSessionId)
customTabSessionId
)
} }
private fun load( private fun load(

@ -766,7 +766,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
withContext(Main) { withContext(Main) {
nav( nav(
R.id.browserFragment, R.id.browserFragment,
BrowserFragmentDirections.actionBrowserFragmentToBookmarkEditFragment(existing.guid) BrowserFragmentDirections.actionGlobalBookmarkEditFragment(existing.guid)
) )
} }
} else { } else {
@ -791,9 +791,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
.setAction(getString(R.string.edit_bookmark_snackbar_action)) { .setAction(getString(R.string.edit_bookmark_snackbar_action)) {
nav( nav(
R.id.browserFragment, R.id.browserFragment,
BrowserFragmentDirections.actionBrowserFragmentToBookmarkEditFragment( BrowserFragmentDirections.actionGlobalBookmarkEditFragment(guid)
guid
)
) )
} }
.show() .show()

@ -221,8 +221,7 @@ class DefaultBrowserToolbarController(
ToolbarMenu.Item.AddonsManager -> { ToolbarMenu.Item.AddonsManager -> {
navController.nav( navController.nav(
R.id.browserFragment, R.id.browserFragment,
BrowserFragmentDirections BrowserFragmentDirections.actionGlobalAddonsManagementFragment()
.actionBrowserFragmentToAddonsManagementFragment()
) )
} }
ToolbarMenu.Item.SaveToCollection -> { ToolbarMenu.Item.SaveToCollection -> {
@ -231,7 +230,7 @@ class DefaultBrowserToolbarController(
currentSession?.let { currentSession -> currentSession?.let { currentSession ->
val directions = val directions =
BrowserFragmentDirections.actionBrowserFragmentToCreateCollectionFragment( BrowserFragmentDirections.actionGlobalCollectionCreationFragment(
previousFragmentId = R.id.browserFragment, previousFragmentId = R.id.browserFragment,
tabIds = arrayOf(currentSession.id), tabIds = arrayOf(currentSession.id),
selectedTabIds = arrayOf(currentSession.id), selectedTabIds = arrayOf(currentSession.id),
@ -316,11 +315,9 @@ class DefaultBrowserToolbarController(
// before we transition the fragment. This makes the animation feel smoother // before we transition the fragment. This makes the animation feel smoother
delay(ANIMATION_DELAY) delay(ANIMATION_DELAY)
if (!navController.popBackStack(R.id.homeFragment, false)) { if (!navController.popBackStack(R.id.homeFragment, false)) {
val directions = BrowserFragmentDirections.actionBrowserFragmentToHomeFragment()
navController.nav( navController.nav(
R.id.browserFragment, R.id.browserFragment,
directions, BrowserFragmentDirections.actionGlobalHome()
null
) )
} }
} }

@ -55,9 +55,10 @@ class CrashReporterController(
components.useCases.tabsUseCases.removeTab(session) components.useCases.tabsUseCases.removeTab(session)
components.useCases.sessionUseCases.crashRecovery.invoke() components.useCases.sessionUseCases.crashRecovery.invoke()
navController.nav( navController.nav(
R.id.crashReporterFragment, R.id.crashReporterFragment,
CrashReporterFragmentDirections.actionCrashReporterFragmentToHomeFragment() CrashReporterFragmentDirections.actionGlobalHome()
) )
return job return job

@ -172,7 +172,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
override fun navToQuickSettingsSheet(session: Session, sitePermissions: SitePermissions?) { override fun navToQuickSettingsSheet(session: Session, sitePermissions: SitePermissions?) {
val directions = ExternalAppBrowserFragmentDirections val directions = ExternalAppBrowserFragmentDirections
.actionExternalAppBrowserFragmentToQuickSettingsSheetDialogFragment( .actionGlobalQuickSettingsSheetDialogFragment(
sessionId = session.id, sessionId = session.id,
url = session.url, url = session.url,
title = session.title, title = session.title,
@ -193,7 +193,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
val isEnabled = session.trackerBlockingEnabled && !contains val isEnabled = session.trackerBlockingEnabled && !contains
val directions = val directions =
ExternalAppBrowserFragmentDirections ExternalAppBrowserFragmentDirections
.actionExternalAppBrowserFragmentToTrackingProtectionPanelDialogFragment( .actionGlobalTrackingProtectionPanelDialogFragment(
sessionId = session.id, sessionId = session.id,
url = session.url, url = session.url,
trackingProtectionEnabled = isEnabled, trackingProtectionEnabled = isEnabled,

@ -582,7 +582,7 @@ class HomeFragment : Fragment() {
} }
private fun navigateToSearch() { private fun navigateToSearch() {
val directions = HomeFragmentDirections.actionHomeFragmentToSearchFragment( val directions = HomeFragmentDirections.actionGlobalSearch(
sessionId = null sessionId = null
) )
@ -590,7 +590,7 @@ class HomeFragment : Fragment() {
} }
private fun openSettingsScreen() { private fun openSettingsScreen() {
val directions = HomeFragmentDirections.actionHomeFragmentToPrivateBrowsingFragment() val directions = HomeFragmentDirections.actionGlobalPrivateBrowsingFragment()
nav(R.id.homeFragment, directions) nav(R.id.homeFragment, directions)
} }
@ -612,7 +612,7 @@ class HomeFragment : Fragment() {
hideOnboardingIfNeeded() hideOnboardingIfNeeded()
nav( nav(
R.id.homeFragment, R.id.homeFragment,
HomeFragmentDirections.actionHomeFragmentToSettingsFragment() HomeFragmentDirections.actionGlobalSettingsFragment()
) )
} }
HomeMenu.Item.Bookmarks -> { HomeMenu.Item.Bookmarks -> {
@ -620,7 +620,7 @@ class HomeFragment : Fragment() {
hideOnboardingIfNeeded() hideOnboardingIfNeeded()
nav( nav(
R.id.homeFragment, R.id.homeFragment,
HomeFragmentDirections.actionHomeFragmentToBookmarksFragment(BookmarkRoot.Mobile.id) HomeFragmentDirections.actionGlobalBookmarkFragment(BookmarkRoot.Mobile.id)
) )
} }
HomeMenu.Item.History -> { HomeMenu.Item.History -> {
@ -628,7 +628,7 @@ class HomeFragment : Fragment() {
hideOnboardingIfNeeded() hideOnboardingIfNeeded()
nav( nav(
R.id.homeFragment, R.id.homeFragment,
HomeFragmentDirections.actionHomeFragmentToHistoryFragment() HomeFragmentDirections.actionGlobalHistoryFragment()
) )
} }
HomeMenu.Item.Help -> { HomeMenu.Item.Help -> {
@ -673,7 +673,7 @@ class HomeFragment : Fragment() {
hideOnboardingIfNeeded() hideOnboardingIfNeeded()
nav( nav(
R.id.homeFragment, R.id.homeFragment,
HomeFragmentDirections.actionHomeFragmentToAccountProblemFragment() HomeFragmentDirections.actionGlobalAccountProblemFragment()
) )
} }
} }

@ -408,7 +408,7 @@ class DefaultSessionControlController(
} }
private fun showShareFragment(data: List<ShareData>) { private fun showShareFragment(data: List<ShareData>) {
val directions = HomeFragmentDirections.actionHomeFragmentToShareFragment( val directions = HomeFragmentDirections.actionGlobalShareFragment(
data = data.toTypedArray() data = data.toTypedArray()
) )
navController.nav(R.id.homeFragment, directions) navController.nav(R.id.homeFragment, directions)

@ -17,7 +17,7 @@ import org.mozilla.fenix.home.HomeFragmentDirections
class OnboardingManualSignInViewHolder(private val view: View) : RecyclerView.ViewHolder(view) { class OnboardingManualSignInViewHolder(private val view: View) : RecyclerView.ViewHolder(view) {
init { init {
view.turn_on_sync_button.setOnClickListener { view.turn_on_sync_button.setOnClickListener {
val directions = HomeFragmentDirections.actionHomeFragmentToTurnOnSyncFragment() val directions = HomeFragmentDirections.actionGlobalTurnOnSync()
Navigation.findNavController(view).navigate(directions) Navigation.findNavController(view).navigate(directions)
} }
} }

@ -85,7 +85,7 @@ class DefaultBookmarkController(
override fun handleBookmarkSharing(item: BookmarkNode) { override fun handleBookmarkSharing(item: BookmarkNode) {
navigate( navigate(
BookmarkFragmentDirections.actionBookmarkFragmentToShareFragment( BookmarkFragmentDirections.actionGlobalShareFragment(
data = arrayOf(ShareData(url = item.url, title = item.title)) data = arrayOf(ShareData(url = item.url, title = item.title))
) )
) )

@ -186,14 +186,14 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
R.id.open_bookmarks_in_new_tabs_multi_select -> { R.id.open_bookmarks_in_new_tabs_multi_select -> {
openItemsInNewTab { node -> node.url } openItemsInNewTab { node -> node.url }
navigate(BookmarkFragmentDirections.actionBookmarkFragmentToHomeFragment()) navigate(BookmarkFragmentDirections.actionGlobalHome())
metrics?.track(Event.OpenedBookmarksInNewTabs) metrics?.track(Event.OpenedBookmarksInNewTabs)
true true
} }
R.id.open_bookmarks_in_private_tabs_multi_select -> { R.id.open_bookmarks_in_private_tabs_multi_select -> {
openItemsInNewTab(private = true) { node -> node.url } openItemsInNewTab(private = true) { node -> node.url }
navigate(BookmarkFragmentDirections.actionBookmarkFragmentToHomeFragment()) navigate(BookmarkFragmentDirections.actionGlobalHome())
metrics?.track(Event.OpenedBookmarksInPrivateTabs) metrics?.track(Event.OpenedBookmarksInPrivateTabs)
true true
} }
@ -202,7 +202,7 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
ShareData(url = it.url, title = it.title) ShareData(url = it.url, title = it.title)
} }
navigate( navigate(
BookmarkFragmentDirections.actionBookmarkFragmentToShareFragment( BookmarkFragmentDirections.actionGlobalShareFragment(
data = shareTabs.toTypedArray() data = shareTabs.toTypedArray()
) )
) )
@ -218,7 +218,10 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
private fun navigate(directions: NavDirections) { private fun navigate(directions: NavDirections) {
invokePendingDeletion() invokePendingDeletion()
nav(R.id.bookmarkFragment, directions) findNavController().nav(
R.id.bookmarkFragment,
directions
)
} }
override fun onBackPressed(): Boolean { override fun onBackPressed(): Boolean {

@ -82,7 +82,7 @@ class DefaultHistoryController(
override fun handleShare(item: HistoryItem) { override fun handleShare(item: HistoryItem) {
navController.navigate( navController.navigate(
HistoryFragmentDirections.actionHistoryFragmentToShareFragment( HistoryFragmentDirections.actionGlobalShareFragment(
data = arrayOf(ShareData(url = item.url, title = item.title)) data = arrayOf(ShareData(url = item.url, title = item.title))
) )
) )

@ -170,7 +170,7 @@ class HistoryFragment : LibraryPageFragment<HistoryItem>(), UserInteractionHandl
nav( nav(
R.id.historyFragment, R.id.historyFragment,
HistoryFragmentDirections.actionHistoryFragmentToHomeFragment() HistoryFragmentDirections.actionGlobalHome()
) )
true true
} }
@ -186,7 +186,7 @@ class HistoryFragment : LibraryPageFragment<HistoryItem>(), UserInteractionHandl
} }
nav( nav(
R.id.historyFragment, R.id.historyFragment,
HistoryFragmentDirections.actionHistoryFragmentToHomeFragment() HistoryFragmentDirections.actionGlobalHome()
) )
true true
} }
@ -245,7 +245,7 @@ class HistoryFragment : LibraryPageFragment<HistoryItem>(), UserInteractionHandl
private fun share(data: List<ShareData>) { private fun share(data: List<ShareData>) {
requireComponents.analytics.metrics.track(Event.HistoryItemShared) requireComponents.analytics.metrics.track(Event.HistoryItemShared)
val directions = HistoryFragmentDirections.actionHistoryFragmentToShareFragment( val directions = HistoryFragmentDirections.actionGlobalShareFragment(
data = data.toTypedArray() data = data.toTypedArray()
) )
nav(R.id.historyFragment, directions) nav(R.id.historyFragment, directions)

@ -160,7 +160,7 @@ class DefaultSearchController(
} }
override fun handleClickSearchEngineSettings() { override fun handleClickSearchEngineSettings() {
val directions = SearchFragmentDirections.actionSearchFragmentToSearchEngineFragment() val directions = SearchFragmentDirections.actionGlobalSearchEngineFragment()
navController.navigateSafe(R.id.searchFragment, directions) navController.navigateSafe(R.id.searchFragment, directions)
} }

@ -271,12 +271,12 @@ class LoginsFragment : PreferenceFragmentCompat(), AccountObserver {
private fun navigateToAccountSettingsFragment() { private fun navigateToAccountSettingsFragment() {
val directions = val directions =
LoginsFragmentDirections.actionLoginsFragmentToAccountSettingsFragment() LoginsFragmentDirections.actionGlobalAccountSettingsFragment()
findNavController().navigate(directions) findNavController().navigate(directions)
} }
private fun navigateToAccountProblemFragment() { private fun navigateToAccountProblemFragment() {
val directions = LoginsFragmentDirections.actionLoginsFragmentToAccountProblemFragment() val directions = LoginsFragmentDirections.actionGlobalAccountProblemFragment()
findNavController().navigate(directions) findNavController().navigate(directions)
} }

@ -147,7 +147,13 @@ class DeleteBrowsingDataFragment : Fragment(R.layout.fragment_delete_browsing_da
if (popAfter) viewLifecycleOwner.lifecycleScope.launch( if (popAfter) viewLifecycleOwner.lifecycleScope.launch(
Dispatchers.Main Dispatchers.Main
) { ) {
returnToDeletionOrigin()
findNavController().apply {
// If the user deletes all open tabs we need to make sure we remove
// the BrowserFragment from the backstack.
popBackStack(R.id.homeFragment, false)
navigate(DeleteBrowsingDataFragmentDirections.actionGlobalSettingsFragment())
}
} }
} }
@ -214,11 +220,6 @@ class DeleteBrowsingDataFragment : Fragment(R.layout.fragment_delete_browsing_da
) )
} }
private fun returnToDeletionOrigin() {
val directions = DeleteBrowsingDataFragmentDirections.actionDeleteBrowsingDataFragmentToSettingsFragment()
findNavController().navigate(directions)
}
companion object { companion object {
private const val ENABLED_ALPHA = 1f private const val ENABLED_ALPHA = 1f
private const val DISABLED_ALPHA = 0.6f private const val DISABLED_ALPHA = 0.6f

@ -208,7 +208,7 @@ class DefaultQuickSettingsController(
*/ */
private fun navigateToManagePhoneFeature(phoneFeature: PhoneFeature) { private fun navigateToManagePhoneFeature(phoneFeature: PhoneFeature) {
val directions = QuickSettingsSheetDialogFragmentDirections val directions = QuickSettingsSheetDialogFragmentDirections
.actionQuickSettingsSheetDialogFragmentToSitePermissionsManagePhoneFeature(phoneFeature.id) .actionGlobalSitePermissionsManagePhoneFeature(phoneFeature.id)
navController.navigate(directions) navController.navigate(directions)
} }
} }

@ -73,7 +73,7 @@ class DefaultShareController(
) : ShareController { ) : ShareController {
override fun handleReauth() { override fun handleReauth() {
val directions = ShareFragmentDirections.actionShareFragmentToAccountProblemFragment() val directions = ShareFragmentDirections.actionGlobalAccountProblemFragment()
navController.nav(R.id.shareFragment, directions) navController.nav(R.id.shareFragment, directions)
dismiss(ShareController.Result.DISMISSED) dismiss(ShareController.Result.DISMISSED)
} }
@ -123,7 +123,7 @@ class DefaultShareController(
override fun handleSignIn() { override fun handleSignIn() {
context.metrics.track(Event.SignInToSendTab) context.metrics.track(Event.SignInToSendTab)
val directions = val directions =
ShareFragmentDirections.actionShareFragmentToTurnOnSyncFragment(padSnackbar = true) ShareFragmentDirections.actionGlobalTurnOnSync(padSnackbar = true)
navController.nav(R.id.shareFragment, directions) navController.nav(R.id.shareFragment, directions)
dismiss(ShareController.Result.DISMISSED) dismiss(ShareController.Result.DISMISSED)
} }

@ -143,8 +143,7 @@ class TrackingProtectionPanelDialogFragment : AppCompatDialogFragment(), UserInt
requireContext().metrics.track(Event.TrackingProtectionSettingsPanel) requireContext().metrics.track(Event.TrackingProtectionSettingsPanel)
nav( nav(
R.id.trackingProtectionPanelDialogFragment, R.id.trackingProtectionPanelDialogFragment,
TrackingProtectionPanelDialogFragmentDirections TrackingProtectionPanelDialogFragmentDirections.actionGlobalTrackingProtectionFragment()
.actionTrackingProtectionPanelDialogFragmentToTrackingProtectionFragment()
) )
} }

@ -5,11 +5,16 @@
android:id="@+id/nav_graph" android:id="@+id/nav_graph"
app:startDestination="@id/homeFragment"> app:startDestination="@id/homeFragment">
<action
android:id="@+id/action_global_home"
app:destination="@id/nav_graph"
app:popUpToInclusive="true" />
<action <action
android:id="@+id/action_global_browser" android:id="@+id/action_global_browser"
app:destination="@id/browserFragment" app:destination="@id/browserFragment"
app:popUpTo="@id/nav_graph" app:popUpTo="@id/nav_graph"
app:popUpToInclusive="true" /> app:popUpToInclusive="false" />
<action <action
android:id="@+id/action_global_external_app_browser" android:id="@+id/action_global_external_app_browser"
@ -23,102 +28,51 @@
app:popUpTo="@id/nav_graph" app:popUpTo="@id/nav_graph"
app:popUpToInclusive="true" /> app:popUpToInclusive="true" />
<action <action android:id="@+id/action_global_shareFragment" app:destination="@id/shareFragment" />
android:id="@+id/action_global_crash_reporter" <action android:id="@+id/action_global_crash_reporter" app:destination="@id/crashReporterFragment" />
app:destination="@id/crashReporterFragment" /> <action android:id="@+id/action_global_turn_on_sync" app:destination="@id/turnOnSyncFragment" />
<action android:id="@+id/action_global_settings_addonsManagementFragment" app:destination="@id/addonsManagementFragment" />
<action <action android:id="@+id/action_global_searchEngineFragment" app:destination="@id/searchEngineFragment" />
android:id="@+id/action_global_turn_on_sync" <action android:id="@+id/action_global_accessibilityFragment" app:destination="@id/accessibilityFragment" />
app:destination="@id/turnOnSyncFragment" /> <action android:id="@+id/action_global_deleteBrowsingDataFragment" app:destination="@id/deleteBrowsingDataFragment" />
<action android:id="@+id/action_global_webExtensionActionPopupFragment" app:destination="@id/webExtensionActionPopupFragment" />
<action <action android:id="@+id/action_global_settingsFragment" app:destination="@id/settingsFragment" />
android:id="@+id/action_global_settingsFragment" <action android:id="@+id/action_global_privateBrowsingFragment" app:destination="@id/privateBrowsingFragment"/>
app:destination="@id/settingsFragment" /> <action android:id="@+id/action_global_bookmarkFragment" app:destination="@id/bookmarkFragment"/>
<action android:id="@+id/action_global_historyFragment" app:destination="@id/historyFragment"/>
<action <action android:id="@+id/action_global_accountProblemFragment" app:destination="@id/accountProblemFragment"/>
android:id="@+id/action_global_settings_addonsManagementFragment" <action android:id="@+id/action_global_SitePermissionsManagePhoneFeature" app:destination="@id/SitePermissionsManagePhoneFeature" />
app:destination="@id/addonsManagementFragment" /> <action android:id="@+id/action_global_collectionCreationFragment" app:destination="@id/collectionCreationFragment" />
<action android:id="@+id/action_global_bookmarkEditFragment" app:destination="@id/bookmarkEditFragment" />
<action <action android:id="@+id/action_global_addonsManagementFragment" app:destination="@id/addonsManagementFragment" />
android:id="@+id/action_global_searchEngineFragment" <action android:id="@+id/action_global_trackingProtectionFragment" app:destination="@id/trackingProtectionFragment" />
app:destination="@id/searchEngineFragment" /> <action android:id="@+id/action_global_exceptionsFragment" app:destination="@id/exceptionsFragment" />
<action android:id="@+id/action_global_accountSettingsFragment" app:destination="@id/accountSettingsFragment" />
<action <action android:id="@+id/action_global_trackingProtectionPanelDialogFragment" app:destination="@id/trackingProtectionPanelDialogFragment" />
android:id="@+id/action_global_accessibilityFragment" <action android:id="@+id/action_global_quickSettingsSheetDialogFragment" app:destination="@id/quickSettingsSheetDialogFragment"/>
app:destination="@id/accessibilityFragment" />
<action
android:id="@+id/action_global_deleteBrowsingDataFragment"
app:destination="@id/deleteBrowsingDataFragment" />
<action
android:id="@+id/action_global_homeFragment"
app:destination="@id/homeFragment" />
<action
android:id="@+id/action_global_webExtensionActionPopupFragment"
app:destination="@id/webExtensionActionPopupFragment" />
<fragment <fragment
android:id="@+id/homeFragment" android:id="@+id/homeFragment"
android:name="org.mozilla.fenix.home.HomeFragment" android:name="org.mozilla.fenix.home.HomeFragment"
tools:layout="@layout/fragment_home"> tools:layout="@layout/fragment_home">
<action
android:id="@+id/action_homeFragment_to_turnOnSyncFragment"
app:destination="@+id/turnOnSyncFragment" />
<action
android:id="@+id/action_homeFragment_to_accountProblemFragment"
app:destination="@id/accountProblemFragment" />
<action
android:id="@+id/action_homeFragment_to_searchFragment"
app:destination="@id/searchFragment"
app:enterAnim="@anim/fade_in_up"
app:popExitAnim="@anim/fade_out_down" />
<action <action
android:id="@+id/action_homeFragment_to_browserFragment" android:id="@+id/action_homeFragment_to_browserFragment"
app:destination="@id/browserFragment" app:destination="@id/browserFragment"
app:exitAnim="@anim/zoom_in_fade" app:exitAnim="@anim/zoom_in_fade"
app:popEnterAnim="@anim/zoom_out_fade" /> app:popEnterAnim="@anim/zoom_out_fade" />
<action
android:id="@+id/action_homeFragment_to_libraryFragment"
app:destination="@id/libraryFragment" />
<action
android:id="@+id/action_homeFragment_to_bookmarksFragment"
app:destination="@id/bookmarkFragment" />
<action
android:id="@+id/action_homeFragment_to_historyFragment"
app:destination="@id/historyFragment" />
<action
android:id="@+id/action_homeFragment_to_settingsFragment"
app:destination="@id/settingsFragment" />
<action <action
android:id="@+id/action_homeFragment_to_createCollectionFragment" android:id="@+id/action_homeFragment_to_createCollectionFragment"
app:destination="@id/collectionCreationFragment" /> app:destination="@id/collectionCreationFragment" />
<action
android:id="@+id/action_homeFragment_to_shareFragment"
app:destination="@id/shareFragment" />
<action
android:id="@+id/action_homeFragment_to_privateBrowsingFragment"
app:destination="@id/privateBrowsingFragment" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/searchFragment" android:id="@+id/searchFragment"
android:name="org.mozilla.fenix.search.SearchFragment" android:name="org.mozilla.fenix.search.SearchFragment"
tools:layout="@layout/fragment_search"> tools:layout="@layout/fragment_search">
<action
android:id="@+id/action_searchFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@id/searchFragment"
app:popUpToInclusive="true" />
<argument <argument
android:name="session_id" android:name="session_id"
app:argType="string" app:argType="string"
app:nullable="true" /> app:nullable="true" />
<action
android:id="@+id/action_searchFragment_to_searchEngineFragment"
app:destination="@id/searchEngineFragment"
app:popUpTo="@+id/searchFragment" />
<argument <argument
android:name="pastedText" android:name="pastedText"
android:defaultValue="@null" android:defaultValue="@null"
@ -180,9 +134,6 @@
android:name="org.mozilla.fenix.browser.BrowserFragment" android:name="org.mozilla.fenix.browser.BrowserFragment"
app:exitAnim="@anim/fade_out" app:exitAnim="@anim/fade_out"
tools:layout="@layout/fragment_browser"> tools:layout="@layout/fragment_browser">
<action
android:id="@+id/action_browserFragment_to_homeFragment"
app:destination="@id/homeFragment" />
<action <action
android:id="@+id/action_browserFragment_to_searchFragment" android:id="@+id/action_browserFragment_to_searchFragment"
app:enterAnim="@anim/fade_in_up" app:enterAnim="@anim/fade_in_up"
@ -202,30 +153,18 @@
<action <action
android:id="@+id/action_browserFragment_to_libraryFragment" android:id="@+id/action_browserFragment_to_libraryFragment"
app:destination="@id/libraryFragment" /> app:destination="@id/libraryFragment" />
<action
android:id="@+id/action_browserFragment_to_bookmarkEditFragment"
app:destination="@id/bookmarkEditFragment" />
<action
android:id="@+id/action_browserFragment_to_createCollectionFragment"
app:destination="@id/collectionCreationFragment" />
<action <action
android:id="@+id/action_browserFragment_to_createShortcutFragment" android:id="@+id/action_browserFragment_to_createShortcutFragment"
app:destination="@id/createShortcutFragment" /> app:destination="@id/createShortcutFragment" />
<action <action
android:id="@+id/action_browserFragment_to_firstTimePwaFragment" android:id="@+id/action_browserFragment_to_firstTimePwaFragment"
app:destination="@id/firstTimePwaFragment" /> app:destination="@id/firstTimePwaFragment" />
<action
android:id="@+id/action_browserFragment_to_shareFragment"
app:destination="@id/shareFragment" />
<action <action
android:id="@+id/action_browserFragment_to_quickSettingsSheetDialogFragment" android:id="@+id/action_browserFragment_to_quickSettingsSheetDialogFragment"
app:destination="@id/quickSettingsSheetDialogFragment" /> app:destination="@id/quickSettingsSheetDialogFragment" />
<action <action
android:id="@+id/action_browserFragment_to_trackingProtectionPanelDialogFragment" android:id="@+id/action_browserFragment_to_trackingProtectionPanelDialogFragment"
app:destination="@id/trackingProtectionPanelDialogFragment" /> app:destination="@id/trackingProtectionPanelDialogFragment" />
<action
android:id="@+id/action_browserFragment_to_addonsManagementFragment"
app:destination="@id/addonsManagementFragment" />
</fragment> </fragment>
<fragment <fragment
@ -240,15 +179,6 @@
android:name="webAppManifest" android:name="webAppManifest"
app:argType="string" app:argType="string"
app:nullable="true" /> app:nullable="true" />
<action
android:id="@+id/action_externalAppBrowserFragment_to_shareFragment"
app:destination="@id/shareFragment" />
<action
android:id="@+id/action_externalAppBrowserFragment_to_quickSettingsSheetDialogFragment"
app:destination="@id/quickSettingsSheetDialogFragment" />
<action
android:id="@+id/action_externalAppBrowserFragment_to_trackingProtectionPanelDialogFragment"
app:destination="@id/trackingProtectionPanelDialogFragment" />
</fragment> </fragment>
<fragment <fragment
@ -268,19 +198,7 @@
android:id="@+id/historyFragment" android:id="@+id/historyFragment"
android:name="org.mozilla.fenix.library.history.HistoryFragment" android:name="org.mozilla.fenix.library.history.HistoryFragment"
android:label="@string/library_history" android:label="@string/library_history"
tools:layout="@layout/fragment_history"> tools:layout="@layout/fragment_history" />
<action
android:id="@+id/action_historyFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpToInclusive="true"
/>
<action
android:id="@+id/action_historyFragment_to_homeFragment"
app:destination="@id/homeFragment" />
<action
android:id="@+id/action_historyFragment_to_shareFragment"
app:destination="@id/shareFragment" />
</fragment>
<fragment <fragment
android:id="@+id/bookmarkFragment" android:id="@+id/bookmarkFragment"
@ -289,22 +207,12 @@
<argument <argument
android:name="currentRoot" android:name="currentRoot"
app:argType="string" /> app:argType="string" />
<action
android:id="@+id/action_bookmarkFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpToInclusive="true"/>
<action <action
android:id="@+id/action_bookmarkFragment_self" android:id="@+id/action_bookmarkFragment_self"
app:destination="@id/bookmarkFragment" /> app:destination="@id/bookmarkFragment" />
<action <action
android:id="@+id/action_bookmarkFragment_to_bookmarkEditFragment" android:id="@+id/action_bookmarkFragment_to_bookmarkEditFragment"
app:destination="@id/bookmarkEditFragment" /> app:destination="@id/bookmarkEditFragment" />
<action
android:id="@+id/action_bookmarkFragment_to_homeFragment"
app:destination="@id/homeFragment" />
<action
android:id="@+id/action_bookmarkFragment_to_shareFragment"
app:destination="@id/shareFragment" />
<action <action
android:id="@+id/action_bookmarkFragment_to_bookmarkAddFolderFragment" android:id="@+id/action_bookmarkFragment_to_bookmarkAddFolderFragment"
app:destination="@id/bookmarkAddFolderFragment" /> app:destination="@id/bookmarkAddFolderFragment" />
@ -342,9 +250,6 @@
android:name="visitedAddBookmark" android:name="visitedAddBookmark"
android:defaultValue="false" android:defaultValue="false"
app:argType="boolean" /> app:argType="boolean" />
<action
android:id="@+id/action_bookmarkSelectFolderFragment_to_browserFragment"
app:destination="@id/browserFragment" />
</fragment> </fragment>
<fragment <fragment
@ -367,20 +272,6 @@
app:popEnterAnim="@anim/slide_in_left" app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" app:popExitAnim="@anim/slide_out_right"
app:destination="@id/savedLoginsFragment" /> app:destination="@id/savedLoginsFragment" />
<action
android:id="@+id/action_loginsFragment_to_accountSettingsFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right"
app:destination="@id/accountSettingsFragment" />
<action
android:id="@+id/action_loginsFragment_to_accountProblemFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right"
app:destination="@id/accountProblemFragment" />
<action <action
android:id="@+id/action_loginsFragment_to_turnOnSyncFragment" android:id="@+id/action_loginsFragment_to_turnOnSyncFragment"
app:enterAnim="@anim/slide_in_right" app:enterAnim="@anim/slide_in_right"
@ -401,10 +292,6 @@
android:id="@+id/settingsFragment" android:id="@+id/settingsFragment"
android:name="org.mozilla.fenix.settings.SettingsFragment" android:name="org.mozilla.fenix.settings.SettingsFragment"
android:label="@string/settings_title"> android:label="@string/settings_title">
<action
android:id="@+id/action_settingsFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@+id/settingsFragment" />
<action <action
android:id="@+id/action_settingsFragment_to_dataChoicesFragment" android:id="@+id/action_settingsFragment_to_dataChoicesFragment"
app:enterAnim="@anim/slide_in_right" app:enterAnim="@anim/slide_in_right"
@ -596,18 +483,10 @@
<fragment <fragment
android:id="@+id/aboutFragment" android:id="@+id/aboutFragment"
android:name="org.mozilla.fenix.settings.about.AboutFragment"> android:name="org.mozilla.fenix.settings.about.AboutFragment"/>
<action
android:id="@+id/action_aboutFragment_to_browserFragment"
app:destination="@id/browserFragment" />
</fragment>
<fragment <fragment
android:id="@+id/crashReporterFragment" android:id="@+id/crashReporterFragment"
android:name="org.mozilla.fenix.crashes.CrashReporterFragment"> android:name="org.mozilla.fenix.crashes.CrashReporterFragment">
<action
android:id="@+id/action_crashReporterFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@id/nav_graph" />
<argument <argument
android:name="crashIntent" android:name="crashIntent"
app:argType="android.content.Intent" /> app:argType="android.content.Intent" />
@ -637,29 +516,15 @@
app:popEnterAnim="@anim/slide_in_left" app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" app:popExitAnim="@anim/slide_out_right"
app:destination="@id/trackingProtectionBlockingFragment" /> app:destination="@id/trackingProtectionBlockingFragment" />
<action
android:id="@+id/action_trackingProtectionFragment_to_browserFragment"
app:destination="@id/browserFragment" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/deleteBrowsingDataFragment" android:id="@+id/deleteBrowsingDataFragment"
android:name="org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataFragment" android:name="org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataFragment"
android:label="@string/preferences_delete_browsing_data" > android:label="@string/preferences_delete_browsing_data" />
<action
android:id="@+id/action_deleteBrowsingDataFragment_to_settingsFragment"
app:destination="@id/settingsFragment"
app:popUpTo="@id/homeFragment" />
</fragment>
<fragment <fragment
android:id="@+id/exceptionsFragment" android:id="@+id/exceptionsFragment"
android:name="org.mozilla.fenix.exceptions.ExceptionsFragment" android:name="org.mozilla.fenix.exceptions.ExceptionsFragment"
android:label="@string/preference_exceptions"> android:label="@string/preference_exceptions"/>
<action
android:id="@+id/action_exceptionsFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@id/settingsFragment"
app:popUpToInclusive="true" />
</fragment>
<dialog <dialog
android:id="@+id/collectionCreationFragment" android:id="@+id/collectionCreationFragment"
android:name="org.mozilla.fenix.collections.CollectionCreationFragment" android:name="org.mozilla.fenix.collections.CollectionCreationFragment"
@ -710,14 +575,6 @@
android:name="showPage" android:name="showPage"
android:defaultValue="false" android:defaultValue="false"
app:argType="boolean" /> app:argType="boolean" />
<action
android:id="@+id/action_shareFragment_to_turnOnSyncFragment"
app:destination="@+id/turnOnSyncFragment"
app:popUpTo="@id/shareFragment"
app:popUpToInclusive="true"/>
<action
android:id="@+id/action_shareFragment_to_accountProblemFragment"
app:destination="@id/accountProblemFragment" />
<action <action
android:id="@+id/action_shareFragment_to_addNewDeviceFragment" android:id="@+id/action_shareFragment_to_addNewDeviceFragment"
app:destination="@id/addNewDeviceFragment" /> app:destination="@id/addNewDeviceFragment" />
@ -754,10 +611,6 @@
android:name="certificateName" android:name="certificateName"
android:defaultValue=" " android:defaultValue=" "
app:argType="string" /> app:argType="string" />
<action
android:id="@+id/action_quickSettingsSheetDialogFragment_to_SitePermissionsManagePhoneFeature"
app:destination="@id/SitePermissionsManagePhoneFeature"
app:popUpTo="@id/quickSettingsSheetDialogFragment" />
</dialog> </dialog>
<fragment <fragment
android:id="@+id/accountProblemFragment" android:id="@+id/accountProblemFragment"
@ -769,9 +622,6 @@
<dialog <dialog
android:id="@+id/signOutFragment" android:id="@+id/signOutFragment"
android:name="org.mozilla.fenix.settings.account.SignOutFragment" /> android:name="org.mozilla.fenix.settings.account.SignOutFragment" />
<action
android:id="@+id/action_global_shareFragment"
app:destination="@id/shareFragment" />
<dialog <dialog
android:id="@+id/trackingProtectionPanelDialogFragment" android:id="@+id/trackingProtectionPanelDialogFragment"
android:name="org.mozilla.fenix.trackingprotection.TrackingProtectionPanelDialogFragment"> android:name="org.mozilla.fenix.trackingprotection.TrackingProtectionPanelDialogFragment">
@ -788,9 +638,6 @@
android:name="gravity" android:name="gravity"
android:defaultValue="80" android:defaultValue="80"
app:argType="integer" /> app:argType="integer" />
<action
android:id="@+id/action_trackingProtectionPanelDialogFragment_to_trackingProtectionFragment"
app:destination="@id/trackingProtectionFragment" />
</dialog> </dialog>
<fragment <fragment
android:id="@+id/trackingProtectionBlockingFragment" android:id="@+id/trackingProtectionBlockingFragment"
@ -808,11 +655,7 @@
android:name="org.mozilla.fenix.share.AddNewDeviceFragment" /> android:name="org.mozilla.fenix.share.AddNewDeviceFragment" />
<fragment <fragment
android:id="@+id/defaultBrowserSettingsFragment" android:id="@+id/defaultBrowserSettingsFragment"
android:name="org.mozilla.fenix.settings.DefaultBrowserSettingsFragment"> android:name="org.mozilla.fenix.settings.DefaultBrowserSettingsFragment"/>
<action
android:id="@+id/action_defaultBrowserSettingsFragment_to_browserFragment"
app:destination="@id/browserFragment" />
</fragment>
<fragment <fragment
android:id="@+id/savedLoginsFragment" android:id="@+id/savedLoginsFragment"
android:name="org.mozilla.fenix.settings.logins.SavedLoginsFragment" android:name="org.mozilla.fenix.settings.logins.SavedLoginsFragment"
@ -820,11 +663,6 @@
<action <action
android:id="@+id/action_savedLoginsFragment_to_savedLoginSiteInfoFragment" android:id="@+id/action_savedLoginsFragment_to_savedLoginSiteInfoFragment"
app:destination="@id/savedLoginSiteInfoFragment" /> app:destination="@id/savedLoginSiteInfoFragment" />
<action
android:id="@+id/action_savedLoginsFragment_to_browserFragment"
app:destination="@id/browserFragment"
app:popUpTo="@id/settingsFragment"
app:popUpToInclusive="true" />
</fragment> </fragment>
<fragment <fragment
android:id="@+id/savedLoginSiteInfoFragment" android:id="@+id/savedLoginSiteInfoFragment"

@ -464,7 +464,7 @@ class DefaultBrowserToolbarControllerTest {
} }
verify { verify {
val directions = val directions =
BrowserFragmentDirections.actionBrowserFragmentToCreateCollectionFragment( BrowserFragmentDirections.actionGlobalCollectionCreationFragment(
previousFragmentId = R.id.browserFragment, previousFragmentId = R.id.browserFragment,
saveCollectionStep = SaveCollectionStep.SelectCollection, saveCollectionStep = SaveCollectionStep.SelectCollection,
tabIds = arrayOf(currentSession.id), tabIds = arrayOf(currentSession.id),
@ -493,7 +493,7 @@ class DefaultBrowserToolbarControllerTest {
} }
verify { verify {
val directions = val directions =
BrowserFragmentDirections.actionBrowserFragmentToCreateCollectionFragment( BrowserFragmentDirections.actionGlobalCollectionCreationFragment(
previousFragmentId = R.id.browserFragment, previousFragmentId = R.id.browserFragment,
saveCollectionStep = SaveCollectionStep.NameCollection, saveCollectionStep = SaveCollectionStep.NameCollection,
tabIds = arrayOf(currentSession.id), tabIds = arrayOf(currentSession.id),

@ -58,7 +58,7 @@ class CrashReporterControllerTest {
} }
@Test @Test
fun `handle close and remove tab`() { fun `"handle close and remove tab`() {
val controller = CrashReporterController(crash, session, navContoller, components, settings) val controller = CrashReporterController(crash, session, navContoller, components, settings)
controller.handleCloseAndRemove(sendCrash = false)?.joinBlocking() controller.handleCloseAndRemove(sendCrash = false)?.joinBlocking()
@ -66,10 +66,7 @@ class CrashReporterControllerTest {
verify { components.useCases.tabsUseCases.removeTab(session) } verify { components.useCases.tabsUseCases.removeTab(session) }
verify { components.useCases.sessionUseCases.crashRecovery.invoke() } verify { components.useCases.sessionUseCases.crashRecovery.invoke() }
verify { verify {
navContoller.navigate( navContoller.navigate(CrashReporterFragmentDirections.actionGlobalHome(), null)
CrashReporterFragmentDirections.actionCrashReporterFragmentToHomeFragment(),
null
)
} }
} }

@ -69,7 +69,7 @@ class DeepLinkIntentProcessorTest {
assertTrue(processor.process(testIntent("fenix://home"), navController, out)) assertTrue(processor.process(testIntent("fenix://home"), navController, out))
verify { activity wasNot Called } verify { activity wasNot Called }
verify { navController.navigate(NavGraphDirections.actionGlobalHomeFragment()) } verify { navController.navigate(NavGraphDirections.actionGlobalHome()) }
verify { out wasNot Called } verify { out wasNot Called }
} }
@ -123,7 +123,7 @@ class DeepLinkIntentProcessorTest {
assertTrue(processor.process(testIntent("fenix://enable_private_browsing"), navController, out)) assertTrue(processor.process(testIntent("fenix://enable_private_browsing"), navController, out))
verify { activity.browsingModeManager.mode = BrowsingMode.Private } verify { activity.browsingModeManager.mode = BrowsingMode.Private }
verify { navController.navigate(NavGraphDirections.actionGlobalHomeFragment()) } verify { navController.navigate(NavGraphDirections.actionGlobalHome()) }
verify { out wasNot Called } verify { out wasNot Called }
} }

@ -183,7 +183,7 @@ class HistoryControllerTest {
assertEquals( assertEquals(
directions.captured::class.simpleName, directions.captured::class.simpleName,
"ActionHistoryFragmentToShareFragment" "ActionGlobalShareFragment"
) )
assertEquals(1, (directions.captured.arguments["data"] as Array<ShareData>).size) assertEquals(1, (directions.captured.arguments["data"] as Array<ShareData>).size)
assertEquals(historyItem.title, (directions.captured.arguments["data"] as Array<ShareData>)[0].title) assertEquals(historyItem.title, (directions.captured.arguments["data"] as Array<ShareData>)[0].title)

@ -236,7 +236,7 @@ class DefaultSearchControllerTest {
@Test @Test
fun handleClickSearchEngineSettings() { fun handleClickSearchEngineSettings() {
val directions: NavDirections = val directions: NavDirections =
SearchFragmentDirections.actionSearchFragmentToSearchEngineFragment() SearchFragmentDirections.actionGlobalSearchEngineFragment()
controller.handleClickSearchEngineSettings() controller.handleClickSearchEngineSettings()

@ -276,7 +276,7 @@ class SearchInteractorTest {
verify { verify {
navController.navigateSafe( navController.navigateSafe(
R.id.searchFragment, R.id.searchFragment,
SearchFragmentDirections.actionSearchFragmentToSearchEngineFragment() SearchFragmentDirections.actionGlobalSearchEngineFragment()
) )
} }
} }

@ -191,7 +191,7 @@ class ShareControllerTest {
metrics.track(Event.SignInToSendTab) metrics.track(Event.SignInToSendTab)
navController.nav( navController.nav(
R.id.shareFragment, R.id.shareFragment,
ShareFragmentDirections.actionShareFragmentToTurnOnSyncFragment() ShareFragmentDirections.actionGlobalTurnOnSync()
) )
dismiss(ShareController.Result.DISMISSED) dismiss(ShareController.Result.DISMISSED)
} }
@ -204,7 +204,7 @@ class ShareControllerTest {
verifyOrder { verifyOrder {
navController.nav( navController.nav(
R.id.shareFragment, R.id.shareFragment,
ShareFragmentDirections.actionShareFragmentToAccountProblemFragment() ShareFragmentDirections.actionGlobalAccountProblemFragment()
) )
dismiss(ShareController.Result.DISMISSED) dismiss(ShareController.Result.DISMISSED)
} }

Loading…
Cancel
Save