mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-09 19:10:42 +00:00
For #2979 - Prevent double navigation to Create Collection Fragment
This commit is contained in:
parent
5f42a65c2a
commit
caa36c31cd
@ -26,6 +26,7 @@ import androidx.navigation.NavDirections
|
|||||||
import androidx.navigation.Navigation
|
import androidx.navigation.Navigation
|
||||||
import androidx.navigation.Navigator
|
import androidx.navigation.Navigator
|
||||||
import androidx.navigation.fragment.FragmentNavigator
|
import androidx.navigation.fragment.FragmentNavigator
|
||||||
|
import androidx.navigation.fragment.NavHostFragment.findNavController
|
||||||
import androidx.transition.TransitionInflater
|
import androidx.transition.TransitionInflater
|
||||||
import kotlinx.android.synthetic.main.fragment_home.*
|
import kotlinx.android.synthetic.main.fragment_home.*
|
||||||
import kotlinx.android.synthetic.main.fragment_home.view.*
|
import kotlinx.android.synthetic.main.fragment_home.view.*
|
||||||
@ -640,6 +641,8 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||||||
selectedTabCollection: TabCollection? = null,
|
selectedTabCollection: TabCollection? = null,
|
||||||
step: SaveCollectionStep = SaveCollectionStep.SelectTabs
|
step: SaveCollectionStep = SaveCollectionStep.SelectTabs
|
||||||
) {
|
) {
|
||||||
|
if (findNavController(this).currentDestination?.id == R.id.createCollectionFragment) return
|
||||||
|
|
||||||
val tabs = requireComponents.core.sessionManager.sessions.filter { !it.private }
|
val tabs = requireComponents.core.sessionManager.sessions.filter { !it.private }
|
||||||
.map { Tab(it.id, it.url, it.url.urlToTrimmedHost(), it.title) }
|
.map { Tab(it.id, it.url, it.url.urlToTrimmedHost(), it.title) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user