Skip to content

Commit

Permalink
For mozilla-mobile#6294 - When only one tab is being saved to collect…
Browse files Browse the repository at this point in the history
…ion, add it to selected tabs.
  • Loading branch information
liuche authored and boek committed Oct 30, 2019
1 parent 2da4b5e commit e129988
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class CollectionCreationFragment : DialogFragment() {
val sessionManager = requireComponents.core.sessionManager
val publicSuffixList = requireComponents.publicSuffixList
val tabs = sessionManager.getTabs(args.tabIds, publicSuffixList)
val selectedTabs = sessionManager.getTabs(args.selectedTabIds, publicSuffixList)
.toSet()
val selectedTabs = if (tabs.size == 1) setOf(tabs.first()) else emptySet()
val tabCollections = requireComponents.core.tabCollectionStorage.cachedTabCollections
val selectedTabCollection = args.selectedTabCollectionId
.let { id -> tabCollections.firstOrNull { it.id == id } }
Expand Down

0 comments on commit e129988

Please sign in to comment.