Fixes #4997: Changed navigation to ShareFragment
Added global navigation action to share fragment in navigation graph Changed share action to use global navigation to ShareFragmentmaster
parent
389b85f783
commit
fc8fc2b33d
|
@ -16,6 +16,7 @@ import kotlinx.coroutines.ObsoleteCoroutinesApi
|
|||
import kotlinx.coroutines.launch
|
||||
import mozilla.components.browser.session.Session
|
||||
import mozilla.components.concept.engine.EngineView
|
||||
import org.mozilla.fenix.NavGraphDirections
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.browser.BrowserFragment
|
||||
import org.mozilla.fenix.browser.BrowserFragmentDirections
|
||||
|
@ -96,8 +97,8 @@ class DefaultBrowserToolbarController(
|
|||
ToolbarMenu.Item.Share -> {
|
||||
val currentUrl = currentSession?.url
|
||||
currentUrl?.apply {
|
||||
val directions = BrowserFragmentDirections.actionBrowserFragmentToShareFragment(this)
|
||||
navController.nav(R.id.browserFragment, directions)
|
||||
val directions = NavGraphDirections.actionGlobalShareFragment(this)
|
||||
navController.navigate(directions)
|
||||
}
|
||||
}
|
||||
ToolbarMenu.Item.NewTab -> {
|
||||
|
|
|
@ -513,4 +513,6 @@
|
|||
<dialog
|
||||
android:id="@+id/signOutFragment"
|
||||
android:name="org.mozilla.fenix.settings.SignOutFragment" />
|
||||
<action android:id="@+id/action_global_shareFragment"
|
||||
app:destination="@id/shareFragment"/>
|
||||
</navigation>
|
||||
|
|
Loading…
Reference in New Issue