2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
Sawyer Blatz 2019-05-23 10:46:54 -07:00 committed by Jeff Boek
parent cea10f040e
commit 0be9adefae
2 changed files with 3 additions and 1 deletions

View File

@ -666,6 +666,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
val selectedSet = mutableSetOf(tabs)
viewModel?.selectedTabs = selectedSet
viewModel?.saveCollectionStep = SaveCollectionStep.SelectCollection
viewModel?.tabCollections = requireComponents.core.tabCollectionStorage.cachedTabCollections.reversed()
view?.let {
val directions = BrowserFragmentDirections.actionBrowserFragmentToCreateCollectionFragment()
Navigation.findNavController(it).navigate(directions)

View File

@ -121,8 +121,9 @@ class CreateCollectionFragment : DialogFragment(), CoroutineScope {
is CollectionCreationAction.SaveCollectionName -> {
showSavedSnackbar(it.tabs.size)
dismiss()
context?.let { context ->
val sessionBundle = it.tabs.toSessionBundle(context)
val sessionBundle = viewModel.selectedTabs.toList().toSessionBundle(context)
launch(Dispatchers.IO) {
requireComponents.core.tabCollectionStorage.createCollection(it.name, sessionBundle)
}