mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-09 19:10:42 +00:00
This commit is contained in:
parent
c197d055b3
commit
4954aadd84
@ -626,7 +626,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||||||
ViewModelProviders.of(this).get(CreateCollectionViewModel::class.java)
|
ViewModelProviders.of(this).get(CreateCollectionViewModel::class.java)
|
||||||
}
|
}
|
||||||
viewModel?.tabs = tabs
|
viewModel?.tabs = tabs
|
||||||
val selectedTabs = tabs.find { tab -> tab.sessionId == selectedTabId }
|
val selectedTabs = tabs.find { tab -> tab.sessionId == selectedTabId } ?: if (tabs.size == 1) tabs[0] else null
|
||||||
val selectedSet = if (selectedTabs == null) mutableSetOf() else mutableSetOf(selectedTabs)
|
val selectedSet = if (selectedTabs == null) mutableSetOf() else mutableSetOf(selectedTabs)
|
||||||
viewModel?.selectedTabs = selectedSet
|
viewModel?.selectedTabs = selectedSet
|
||||||
viewModel?.tabCollections = requireComponents.core.tabCollectionStorage.cachedTabCollections.reversed()
|
viewModel?.tabCollections = requireComponents.core.tabCollectionStorage.cachedTabCollections.reversed()
|
||||||
|
Loading…
Reference in New Issue
Block a user